feat(theme-common): stable classname for code blocks (#6125)

* feat(theme-common): stable classname for code blocks

* Remove extra lines

* Fix styles

* Remove line
This commit is contained in:
Joshua Chen 2021-12-18 13:32:30 +08:00 committed by GitHub
parent a5d2815154
commit 06bd44c693
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 2 deletions

View file

@ -114,6 +114,7 @@ import CodeBlock from '@theme/CodeBlock';
{ThemeClassNamesCode
// remove source comments
.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g,'')
.replace(/^ *\n/gm,'')
.trim()}
</CodeBlock>
```