escaping asterisks inside italic block
See original GitHub issueReported in a Google Groups post.
Is it possible to escape asterisks within an italic (or bold) block?
What I type in:
*hello*
\*hello\*
*\*hello\**
\**hello*\*
*hello \* world*
I expect something like:
<p><em>hello</em></p>
<p>*hello*</p>
<p><em>*hello*</em></p>
<p>*<em>hello</em>*</p>
<p><em>hello * world</em></p>
What I get in from markdown-here:
<p><em>hello</em></p>
<p>*hello*</p>
<p><em>\</em>hello**</p>
<p>*<em>hello</em>*</p>
<p><em>hello \</em> world*</p>
(style
properties removed for readability.) The first two are (as expected) fine. The third thinks I want to italize the backslash. The fourth is the closest, but perhaps I want the asterisks italicized (it sounded fine before I actually read what I am saying …). From the last it appears that the escaped-asterisk is not considered inside a bold/italic block.
Workaround: Instead of trying to escape the asterisks, use one of the HTML entities for asterisk, like: *
Issue Analytics
- State:
- Created 8 years ago
- Reactions:51
- Comments:8
Top Results From Across the Web
Still can't figure out how to post asterisks without italics or bold ...
I tried the backslash before the asterisks trick to escape formatting and it posted the comment as backslashes around italic font.
Read more >4.16 Escape special characters | R Markdown Cookbook
You need to escape the underscores if you want verbatim underscores instead of italic text. The way to escape a special character is...
Read more >Display * (asterisk) in textfield and disable italic function
As this field ist WYSIWYG and the text is generated and saved as HTML code as I write, the workarounds with kirbytext hooks...
Read more >How to italicize reStructuredText when something other than a ...
I've figured it out, I need to use an escaped space, which will behave like space but will not show up. See here....
Read more >Escape and Prevent Substitutions | Asciidoctor Docs
The asterisks around it are preserved. \§ appears as an entity reference. It's not converted into the section symbol (§). \=> The backslash...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did use
*
and it does work, but I agree it’s less obvious. I will fix the>
, thank you for that.Having a bare
>
in HTML can be problematic, so converting it to>
is the safer thing to do. However, the\<\em>
is an issue (as is the unconverted trailing asterisk), apparently MDH is missing the preceding backslash. You can force the literal asterisk with*
, I think, though that’s less convenient and obvious.