mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-28 14:08:21 +02:00
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:
parent
e1a8db7d91
commit
d938ff7430
2 changed files with 19 additions and 0 deletions
|
@ -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 {
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue