fix(theme-classic): code block line number display with line wrapping (#7910)

* fix: line numbers display issue of code block

* test: add dogfooding test page

* chore: lint

* test: move to code-block-tests
This commit is contained in:
yzhe819 2022-08-08 03:01:31 +12:00 committed by GitHub
parent e1a8db7d91
commit d938ff7430
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View file

@ -35,6 +35,7 @@ the background in custom CSS file due bug https://github.com/facebook/docusaurus
left: 0;
padding: 0 var(--ifm-pre-padding);
background: var(--ifm-pre-background);
overflow-wrap: normal;
}
.codeLineNumber::before {

View file

@ -249,3 +249,21 @@ echo "short_initially_hidden_string"
</Tabs>
[// spell-checker:enable]: #
```jsx showLineNumbers
import React from 'react';
import Layout from '@theme/Layout';
export default function MyReactPage() {
return (
<Layout>
<h1>My React page</h1>
<p>
This is a React page. Let's make this sentence bit long. Some more words
to make sure... Some more words to make sure... Some more words to make
sure...
</p>
</Layout>
);
}
```