Skip to content
This repository was archived by the owner on Nov 2, 2025. It is now read-only.

Commit 5423a77

Browse files
YDKKslorber
andauthored
fix(cssnano-preset): disable CSS counter minification (facebook#11487)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
1 parent 2a10b54 commit 5423a77

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/docusaurus-cssnano-preset/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ const preset: typeof advancedBasePreset = function preset(opts) {
1313
const advancedPreset = advancedBasePreset({
1414
autoprefixer: {add: false},
1515
discardComments: {removeAll: true},
16+
// See CodeBlock custom line number bug: https://github.com/facebook/docusaurus/pull/11487
17+
/* cSpell:ignore Idents */
18+
reduceIdents: {counter: false},
1619
/* cSpell:ignore zindex */
1720
zindex: false,
1821
...opts,

website/_dogfooding/_pages tests/code-block-tests.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,13 @@ function PageLayout(props) {
226226
}
227227
```
228228

229+
```jsx showLineNumbers=4
230+
function PageLayout(props) {
231+
// highlight-next-line
232+
return <Layout title="Awesome Docusaurus page" description="Test Test Test Test Test Test Test Test Test Test Test Test Test Test ">;
233+
}
234+
```
235+
229236
```jsx {1,3,6} showLineNumbers
230237
function PageLayout(props) {
231238
console.log(

0 commit comments

Comments
 (0)