You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
609 B
29 lines
609 B
Prism.languages.bbcode = { |
|
'tag': { |
|
pattern: /\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/, |
|
inside: { |
|
'tag': { |
|
pattern: /^\[\/?[^\s=\]]+/, |
|
inside: { |
|
'punctuation': /^\[\/?/ |
|
} |
|
}, |
|
'attr-value': { |
|
pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/, |
|
inside: { |
|
'punctuation': [ |
|
/^=/, |
|
{ |
|
pattern: /^(\s*)["']|["']$/, |
|
lookbehind: true |
|
} |
|
] |
|
} |
|
}, |
|
'punctuation': /\]/, |
|
'attr-name': /[^\s=\]]+/ |
|
} |
|
} |
|
}; |
|
|
|
Prism.languages.shortcode = Prism.languages.bbcode;
|
|
|