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.

Less-than or greater-than sign in text

See original GitHub issue

It appears that you can’t currently use < or > characters in text.

For example, this markdown:

# Hello, MDX
  
I <3 Markdown and JSX

Produces this JSX:

export default ({components}) => <MDXTag name="wrapper"><MDXTag name="h1" components={components}>Hello, MDX</MDXTag>
<MDXTag name="p" components={components}> I <3 Markdown and JSX</MDXTag></MDXTag>

Which fails to compile in babel.

MDXC compiles this the following way:

export default function({ factories={} }) {
  const {
    h1 = createFactory('h1'),
    p = createFactory('p'),
    wrapper = createFactory('div'),
  } = factories

  return wrapper({},
    h1({"id": "Hello-MDX"},
      "Hello, MDX",
    ),
    p({},
      "I <3 Markdown and JSX",
    )
  )
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
timneutkenscommented, May 1, 2018

I’m going to fix this once and for all in a bit 👍 We just need to turn text nodes into

{`CONTENT`}

And then escape backticks. Exactly the same as code/inlineCode works right now.

1reaction
chardskarthcommented, Sep 3, 2021

Hi, I’m experiencing this again.

Screen Shot 2021-09-03 at 3 20 35 PM

I’m using @mdx-js/loader@1.6.22

Read more comments on GitHub >

github_iconTop Results From Across the Web

⋘ ≮ ≲ ≰ ⥷ Less Than Symbols - Alt Codes
List of Less Than symbols with html entity, unicode number code. Learn how to make over 43 Less Than symbols of math, copy...
Read more >
punctuation - Why do the less than symbol (<) and the greater ...
When typing < or > in LaTeX and compiling with pdflatex , the less than and greater than symbols appear at upside down...
Read more >
Less than and greater than symbols - LaTeX-Tutorial.com
In mathematics, the less than and greater than signs denote an inequality between two values. These signs are easily typeset in LaTeX using...
Read more >
Why do people do ">>>>>" when saying "greater than ... - Reddit
It's saying that X is greater than (>) Y. For example: say someone tweets "The Wire>>>Breaking Bad". They're saying that The Wire is...
Read more >
If you use the less than (<) or greater than (>) signs in your text ...
If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags. My...
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