mirror of
https://gitee.com/ssssssss-team/magic-api.git
synced 2026-06-08 09:52:53 +08:00
代码高亮优化
This commit is contained in:
@@ -9,10 +9,6 @@ export const HighLightOptions = {
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/\s+/, 'white'],
|
||||
[
|
||||
/```((?:\w|[\/\-#])+).*$/,
|
||||
{ token: 'string', next: '@codeblockgh', nextEmbedded: '$1' }
|
||||
],
|
||||
[/```$/, { token: 'string', next: '@codeblock' }],
|
||||
[/[a-zA-Z_$][\w$]*[\s]?/, {
|
||||
cases: {
|
||||
@@ -78,10 +74,6 @@ export const HighLightOptions = {
|
||||
[/^```$/, { token: 'string', next: '@pop' }],
|
||||
[/.*$/, 'variable.source']
|
||||
],
|
||||
codeblockgh: [
|
||||
[/```\s*$/, { token: 'variable.source', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/[^`]+/, 'variable.source']
|
||||
],
|
||||
regexrange: [
|
||||
[/-/, 'regexp.escape.control'],
|
||||
[/\^/, 'regexp.invalid'],
|
||||
|
||||
Reference in New Issue
Block a user