This commit is contained in:
Timothy Jaeryang Baek committed 2026-08-24 19:20:24 -04:00
1 parent 0169b10979
commit 11db926a7b
3 files changed
+27 -1

No files matched your search

+20 -1
View File
@@ -102,11 +102,30 @@ function detailsExtension() {
};
}
function underlineExtension() {
return {
name: 'underline',
level: 'inline',
start: (src: string) => src.indexOf('<u>'),
tokenizer(this: any, src: string) {
const match = /^<u>([\s\S]+?)<\/u>/.exec(src);
if (!match) return;
return {
type: 'underline',
raw: match[0],
text: match[1],
tokens: this.lexer.inlineTokens(match[1])
};
}
};
}
export default function (options = {}) {
return {
tokenizer: {
lheading: lheadingTokenizer as any
},
extensions: [detailsExtension()]
extensions: [detailsExtension(), underlineExtension()]
};
}