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 = {
|
||||
defineNodes: [
|
||||
@ -164,7 +164,7 @@ export const Attribute: MarkdownConfig = {
|
||||
) {
|
||||
return -1;
|
||||
}
|
||||
const [fullMatch, attributeName, attributeColon, attributeValue] =
|
||||
const [fullMatch, attributeName, attributeColon, _attributeValue] =
|
||||
match;
|
||||
const endPos = pos + fullMatch.length;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user