0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 18:12:40 +00:00

Revert "Simple Underline token."

This reverts commit 04187cf769.
This commit is contained in:
David Bolack
2024-01-18 09:51:14 -06:00
parent ac9fc720f7
commit 0c6c9fce4d

View File

@@ -239,24 +239,9 @@ const underline = {
level : 'inline',
start(src) { return src.match(/\w_[^_]_/m)?.index;},
tokenizer(src, tokens) {
const uRegex = /^_([^_]*)_/m;
const match = uRegex.exec(src);
console.log('Looking');
if(match?.length) {
console.log('found!');
console.log(match);
return {
type : 'underline',
raw : match[0],
tokens : this.lexer.inlineTokens(match[1])
};
}
},
renderer(token) {
console.log()
return `<u>${this.parser.parseInline(token.tokens)}</u>`;
const uRegex = /^_(?!\s)(?=([^_]*[^\s]))\1\^/m;
}
};
}
const definitionLists = {
name : 'definitionLists',
@@ -290,7 +275,7 @@ const definitionLists = {
}
};
Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists, superSubScripts, underline] });
Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists, superSubScripts] });
Marked.use(mustacheInjectBlock);
Marked.use({ renderer: renderer, mangle: false });
Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartypantsLite());