mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-03 19:12:41 +00:00
Update shared/naturalcrit/markdown.js
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7b9a23670d
commit
c6d8bbae16
@@ -211,7 +211,7 @@ const superSubScripts = {
|
|||||||
level : 'inline',
|
level : 'inline',
|
||||||
start(src) { return src.match(/\^\^[^\s].+[^\s]\^\^/m)?.index; }, // Hint to Marked.js to stop and check for a match
|
start(src) { return src.match(/\^\^[^\s].+[^\s]\^\^/m)?.index; }, // Hint to Marked.js to stop and check for a match
|
||||||
tokenizer(src, tokens) {
|
tokenizer(src, tokens) {
|
||||||
const superRegex = /^\^\^([^\s\^][^\^]*[^\s\^])\^\^/m;
|
const superRegex = /^\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/m;
|
||||||
const subRegex = /^\^\^\^([^\s\^][^\^]*[^\s\^])\^\^\^/m;
|
const subRegex = /^\^\^\^([^\s\^][^\^]*[^\s\^])\^\^\^/m;
|
||||||
let isSuper = false;
|
let isSuper = false;
|
||||||
let match = subRegex.exec(src);
|
let match = subRegex.exec(src);
|
||||||
|
|||||||
Reference in New Issue
Block a user