question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Language html is not supported

See original GitHub issue

I am trying to use a code block with html (which is supported according to supported languages), but it gives me the following error:

async-syntax-highlighter.js:110 Uncaught (in promise) Error: Language html not supported at Function._callee$ (async-syntax-highlighter.js:110) at tryCatch (runtime.js:45) at Generator.invoke [as _invoke] (runtime.js:274) at Generator.prototype.<computed> [as next] (runtime.js:97) at asyncGeneratorStep (asyncToGenerator.js:3) at _next (asyncToGenerator.js:25) at asyncToGenerator.js:32 at new Promise (<anonymous>) at Function.<anonymous> (asyncToGenerator.js:21) at Function.loadLanguage (async-syntax-highlighter.js:121) at ReactAsyncHighlighter.loadLanguage (async-syntax-highlighter.js:67) at ReactAsyncHighlighter.componentDidMount (async-syntax-highlighter.js:53) at commitLifeCycles (react-dom.development.js:19814) at commitLayoutEffects (react-dom.development.js:22803) at HTMLUnknownElement.callCallback (react-dom.development.js:188) at Object.invokeGuardedCallbackDev (react-dom.development.js:237) at invokeGuardedCallback (react-dom.development.js:292) at commitRootImpl (react-dom.development.js:22541) at unstable_runWithPriority (scheduler.development.js:653) at runWithPriority$1 (react-dom.development.js:11039) at commitRoot (react-dom.development.js:22381) at finishSyncRender (react-dom.development.js:21807) at performSyncWorkOnRoot (react-dom.development.js:21793) at react-dom.development.js:11089 at unstable_runWithPriority (scheduler.development.js:653) at runWithPriority$1 (react-dom.development.js:11039) at flushSyncCallbackQueueImpl (react-dom.development.js:11084) at flushSyncCallbackQueue (react-dom.development.js:11072) at flushPassiveEffectsImpl (react-dom.development.js:22883) at unstable_runWithPriority (scheduler.development.js:653) at runWithPriority$1 (react-dom.development.js:11039) at flushPassiveEffects (react-dom.development.js:22820) at react-dom.development.js:22699 at workLoop (scheduler.development.js:597) at flushWork (scheduler.development.js:552) at MessagePort.performWorkUntilDeadline (scheduler.development.js:164)

here is my implementation

<CopyBlock text={code} language="html" showLineNumbers={true} theme={dracula} wrapLines codeBlock />

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
rajinwonderlandcommented, Aug 30, 2020

Hey @mat250, this is actually a documentation error on my part.

In order to render html inside a CodeBlock or CopyBlock component, you’ll need to mark the language prop with markup not html.

Like so:

<CopyBlock
  text={code}
  language="markup"
  showLineNumbers={false}
  theme={dracula} 
/>

I’ve posted a codesanbox example here for more context.

We will have to update the docs to reflect this for now.

I’m hoping to implement html as a key that maps to markup in a future version when I have a little more time!

Let me know if you have more questions!

1reaction
mat250commented, Aug 31, 2020

Thanks @rajinwonderland , that’s working !

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML language not supported or defined #43394 - GitHub
I am totally new to coding and visual studio but I know something HTML and I tried to make a small website and...
Read more >
VSC: HTML language not supported or defined - Stack Overflow
HTML is not a language to run (runnable examples are PowerShell or JavaScript). Do study an extension via a search engine before using...
Read more >
code language not supported or defined - YouTube
code language not supported or defined ... Run HTML in Visual Studio Code 2021 Using 3 Extensions: Live Server, Code Runner and Open...
Read more >
Code language not supported or defined? : r/programminghelp
HTML stands for hyper text markup language, it's a markup language not a programming language. It is essentially used to format a text ......
Read more >
Why HTML is Not a Programming Language by Ben Romy
This is because HTML is not a programming language. Unfortunately, coding only in HTML doesn't make you a programmer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found