Skip to content

Commit

Permalink
fix(theme-classic): code block line number display with line wrapping (
Browse files Browse the repository at this point in the history
…#7910)

* fix: line numbers display issue of code block

* test: add dogfooding test page

* chore: lint

* test: move to code-block-tests
  • Loading branch information
yzhe819 committed Aug 7, 2022
1 parent e1a8db7 commit d938ff7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Expand Up @@ -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 {
Expand Down
18 changes: 18 additions & 0 deletions website/_dogfooding/_pages tests/code-block-tests.mdx
Expand Up @@ -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>
);
}
```

0 comments on commit d938ff7

Please sign in to comment.