Exit regex matching on unclosed MFM tag
ci/woodpecker/tag/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Sol Fisher Romanoff 2022-07-10 22:30:53 +03:00
parent 08c65455e5
commit c748bacc0f
Signed by: nbsp
GPG Key ID: 9D3F2B64F2341B62
3 changed files with 8 additions and 1 deletions

View File

@ -94,6 +94,10 @@
var walk = 0;
while (level > 0 || walk === 0) {
if (walk >= src.length) {
return null;
}
if (src[walk] + src[walk + 1] === '$[') {
level++;
walk++;

View File

@ -1,6 +1,6 @@
{
"name": "marked-mfm",
"version": "0.3.1",
"version": "0.3.2",
"description": "Marked.js extension for Misskey-flavored Markdown",
"main": "./src/index.js",
"browser": "./lib/index.umd.js",

View File

@ -10,6 +10,9 @@ export default {
let level = 0
let walk = 0
while (level > 0 || walk === 0) {
if (walk >= src.length) {
return null
}
if (src[walk] + src[walk + 1] === '$[') {
level++
walk++