tcmd: italic
This commit is contained in:
@@ -76,6 +76,21 @@ export const inlineTokens: {
|
||||
return l.replace(this.rx, (_, __, val) => val);
|
||||
},
|
||||
},
|
||||
{
|
||||
rx: /(?<!\*)\*([^\*]+?)\*(?!\*)/g,
|
||||
create(content, start, end, tokens) {
|
||||
tokens.push({
|
||||
content: this.replace(content[0]),
|
||||
type: "italic",
|
||||
end,
|
||||
start,
|
||||
uuid: crypto.randomUUID(),
|
||||
});
|
||||
},
|
||||
replace(l) {
|
||||
return l.replace(this.rx, (...all) => all[1]);
|
||||
},
|
||||
},
|
||||
{
|
||||
rx: /(?<![\!\?|^])\[(.*?)\]\((.*?)\)/g,
|
||||
create(content, start, end, tokens) {
|
||||
|
Reference in New Issue
Block a user