Skip to content

Commit

Permalink
fix(shiki): issue with JSON import (#1824)
Browse files Browse the repository at this point in the history
Co-authored-by: Farnabaz <farnabaz@gmail.com>
  • Loading branch information
SheetJSDev and farnabaz committed Jan 19, 2023
1 parent ee6eb99 commit 1cc86bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/runtime/transformers/shiki/highlighter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getHighlighter, BUNDLED_LANGUAGES, BUNDLED_THEMES, Lang, Theme as Shiki
import consola from 'consola'
import type { ModuleOptions } from '../../../module'
import { createSingleton } from '../utils'
import mdcTMLanguage from './languages/mdc.tmLanguage.json'
import mdcTMLanguage from './languages/mdc.tmLanguage'
import type { MarkdownNode, HighlighterOptions, Theme, HighlightThemedToken, HighlightThemedTokenLine, TokenColorMap } from './types'

// Re-create logger locally as utils cannot be imported from here
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
/* eslint-disable */
// see microsoft/vscode-textmate#185
// import { IRawGrammar } from 'vscode-textmate/release/rawGrammar';

const grammar /*: IRawGrammar */ = {
"information_for_contributors": [
"This file has been converted from https://github.com/docusgen/vscode-extension/blob/main/syntaxes/mdc.tmLanguage.json",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
Expand Down Expand Up @@ -64,7 +68,7 @@
"include": "#markdown_attributes"
}
]
},
},
"markdown_attributes": {
"match": "(?x)([^ ])( # attributes\n ({)\n ([^{]*)\n (})\n )",
"name": "markup.component.attribute",
Expand Down Expand Up @@ -570,4 +574,6 @@
"while": "(^|\\G)\\s*(>) ?"
}
}
}
}

export default grammar;

0 comments on commit 1cc86bd

Please sign in to comment.