Restrict attribute names
This commit is contained in:
parent
95df296197
commit
41fb82b9d2
@ -142,7 +142,7 @@ export const Highlight: MarkdownConfig = {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
export const attributeRegex = /^\[([^:]+)(::\s*)([^\]]+)\]/;
|
export const attributeRegex = /^\[(\w+)(::\s*)([^\]]+)\]/;
|
||||||
|
|
||||||
export const Attribute: MarkdownConfig = {
|
export const Attribute: MarkdownConfig = {
|
||||||
defineNodes: [
|
defineNodes: [
|
||||||
@ -164,7 +164,7 @@ export const Attribute: MarkdownConfig = {
|
|||||||
) {
|
) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
const [fullMatch, attributeName, attributeColon, attributeValue] =
|
const [fullMatch, attributeName, attributeColon, _attributeValue] =
|
||||||
match;
|
match;
|
||||||
const endPos = pos + fullMatch.length;
|
const endPos = pos + fullMatch.length;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user