feat(prism): define hex/binary langs for better highlighting
This commit is contained in:
parent
e7cbe0330b
commit
b9e2597bc0
|
@ -10,6 +10,18 @@ declare const Prism: any;
|
|||
|
||||
(() => {
|
||||
Prism.languages.extend('markup', {});
|
||||
Prism.languages.hex = {
|
||||
'number': {
|
||||
pattern: /(?:[a-f0-9]{3}){1,2}\b/i,
|
||||
lookbehind: true
|
||||
}
|
||||
};
|
||||
Prism.languages.binary = {
|
||||
'number': {
|
||||
pattern: /[10]+/i,
|
||||
lookbehind: true
|
||||
}
|
||||
};
|
||||
Prism.languages.insertBefore('custom', 'tag', {
|
||||
'mark': {
|
||||
pattern: /<\/?mark(?:\s+\w+(?:=(?:"[^"]*"|'[^']*'|[^\s'">=]+))?\s*|\s*)\/?>/,
|
||||
|
|
Loading…
Reference in New Issue