Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: JSON import type assertion #1824

Merged
merged 3 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
farnabaz marked this conversation as resolved.
Show resolved Hide resolved
// 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;