remarkjs / remark-rehype

plugin that turns markdown into HTML to support rehype
https://remark.js.org
MIT License
266 stars 18 forks source link

Italic Markdown: "*u-*a" #18

Closed yCobanoglu closed 3 years ago

yCobanoglu commented 3 years ago

Italic not working properly

Steps to reproduce

Tested using your codesandbox setup.

unified()
  .use(remarkParse)
  .use(remarkRehype)
  .use(rehypeStringify)
  .process("*u-*a")

Expected behavior

<p><em>u-<em/>a<p/>

Actual behavior

<p>*u-*a<p/>

wooorm commented 3 years ago

Please use markdown code for the code in your issue, this is not very readable. See: https://commonmark.org/help/ for more info

ChristianMurphy commented 3 years ago

Italic is working exactly as it should, your example isn't an italic https://spec.commonmark.org/dingus/?text=*u-*a https://astexplorer.net/#/gist/372eee01459eaf12ce733122893bb587/a852c73ea7e7bc3cbc2bb4352fbb53b5a701fdf0

This is also documented in the markdown spec https://spec.commonmark.org/0.29/#example-371