fix(v1): fenced block detection (#3340)

This commit is contained in:
adinaja 2020-08-27 10:06:10 +02:00 committed by GitHub
parent 306d3afc0a
commit 8fd5375b26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View file

@ -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