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

Accept plaintext #16

Closed
usernamehw opened this issue Jun 30, 2019 · 1 comment
Closed

Accept plaintext #16

usernamehw opened this issue Jun 30, 2019 · 1 comment

Comments

@usernamehw
Copy link

usernamehw commented Jun 30, 2019

If the language is undefined - there's an error

highlighter.codeToHtml('', undefined);

TypeError: Cannot read property 'tokenizeLine' of undefined

But I just want to have a simple block (just like GFM):

no highlighting

Using plaintext, txt, text doesn't work

highlighter.codeToHtml('', 'plaintext');

shiki-languages seems to be missing plaintext too.

export declare type TCommonLang = 'clojure' | 'c' | 'cpp' | 'css' | 'go' | 'html' | 'jade' | 'java' | 'jsx' | 'javascript' | 'json' | 'less' | 'lua' | 'makefile' | 'markdown' | 'objective-c' | 'perl6' | 'php' | 'python' | 'r' | 'ruby' | 'rust' | 'scss' | 'shellscript' | 'sql' | 'swift' | 'typescript' | 'tsx' | 'xml' | 'yaml'
/**
 * Extra grammars
 */
 | 'haml' | 'graphql' | 'postcss' | 'sass' | 'stylus' | 'vue' | 'vue-html' | 'latex';
export declare type TCommonLangAlias = 'clj' | 'c++' | 'htm' | 'xhtml' | 'js' | 'objc' | 'py' | 'rb' | 'shell' | 'bash' | 'sh' | 'ts'
/**
 * Extra grammars
 */
 | 'styl' | 'tex';
export declare type TOtherLang = 'bat' | 'coffeescript' | 'diff' | 'dockerfile' | 'fsharp' | 'git-commit' | 'git-rebase' | 'groovy' | 'handlebars' | 'ini' | 'properties' | 'perl' | 'powershell' | 'razor' | 'shaderlab' | 'vb' | 'xsl';
export declare type TLang = TCommonLang | TCommonLangAlias | TOtherLang;
@octref
Copy link
Collaborator

octref commented Jul 1, 2019

Alright I can add it.

@octref octref closed this as completed in d507a22 Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants