highlightjs / highlight.js

JavaScript syntax highlighter with language auto-detection and zero dependencies.
https://highlightjs.org/
BSD 3-Clause "New" or "Revised" License
23.59k stars 3.58k forks source link

(javascript/typescript) Inline {} code may also contain mixed JS/XML syntax: #2721

Open joshgoebel opened 4 years ago

joshgoebel commented 4 years ago

Inline {} code may also contain mixed JS/XML syntax:

const Count = ({ count }) => {
  return (
    <div>
      {count > 10 ? <BigCount /> : <SmallCount />}
    </div>
  );
}

Originally posted by @luisherranz in https://github.com/highlightjs/highlight.js/issues/2324#issuecomment-565960485

joshgoebel commented 4 years ago

Pulling this out into a separate issue as I'm not sure I want to deal with this on the first pass of improved JSX support.