mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 12:37:01 +02:00
fix(v1): fenced block detection (#3340)
This commit is contained in:
parent
306d3afc0a
commit
8fd5375b26
2 changed files with 17 additions and 1 deletions
|
@ -69,7 +69,7 @@ function autoPrefixCss(cssContent) {
|
|||
function replaceAssetsLink(oldContent, location) {
|
||||
let fencedBlock = false;
|
||||
const lines = oldContent.split('\n').map((line) => {
|
||||
if (line.trim().startsWith('```')) {
|
||||
if (line.trim().startsWith('```') && line.match(/`/g).length === 3) {
|
||||
fencedBlock = !fencedBlock;
|
||||
}
|
||||
return fencedBlock
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue