Skip to content

Commit

Permalink
fix: revert refactor in markdown-kroki and plantuml modules (#2619)
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel authored Oct 26, 2020
1 parent f56b6ee commit 04a1896
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions server/modules/rendering/markdown-kroki/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,13 @@ module.exports = {
continue
}

const i = closeMarker.findIndex(item => item !== state.src[start + i])
const closeMarkerMatched = i !== -1
let closeMarkerMatched = true
for (i = 0; i < closeMarker.length; ++i) {
if (closeMarker[i] !== state.src[start + i]) {
closeMarkerMatched = false
break
}
}

if (!closeMarkerMatched) {
continue
Expand Down
9 changes: 7 additions & 2 deletions server/modules/rendering/markdown-plantuml/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ module.exports = {
continue
}

const i = closeMarker.findIndex(item => item !== state.src[start + i])
const closeMarkerMatched = i !== -1
let closeMarkerMatched = true
for (i = 0; i < closeMarker.length; ++i) {
if (closeMarker[i] !== state.src[start + i]) {
closeMarkerMatched = false
break
}
}

if (!closeMarkerMatched) {
continue
Expand Down

0 comments on commit 04a1896

Please sign in to comment.