11
***SomeText***

gives

SomeText

but

***Some_Text***

gives

Some_Text

It seems as though there's interference with the underscore character, since it can be used itself as markup for italics. Only it doesn't kick in at all, and it's not in first or last position.

5
  • 1
    It's partly because the underscore also does bold (__bold__) and italic (_italic_)
    – ChrisF Mod
    Oct 15, 2011 at 11:51
  • 2
    This is not a bug, it's a feature of nested incomplete format markup.
    – DanBeale
    Oct 15, 2011 at 14:01
  • I was trying to implement a simplified markup myself. My approach was to cut up text by space (think of split in java). Ever string that started with a markup sign was a markup start, and every string that ended with a markup sign was a markup end.
    – MPelletier
    Oct 15, 2011 at 18:32
  • tl;dr It's not a feature if it's not expected to work that way. It's a limitation.
    – MPelletier
    Oct 15, 2011 at 18:32
  • Currently, the second example shows concatenate("Some", "_", "Text") in both bold and italics. That's what I'd expect. Maybe the fix fixed the example. Anyone remember what it showed before the fix? Did it swallow the underscore?
    – benrifkah
    Feb 3, 2022 at 20:01

3 Answers 3

2

This is will behave as expected after the next build.

1
  • Just quoting: ***text*** now renders as <strong><em>text</em></strong> Jun 18, 2019 at 16:10
18

Escape the underscore with a backslash.

***Some\_Text***

Some_Text

1
  • 1
    Oh, that is a nice workaround!
    – MPelletier
    Oct 15, 2011 at 11:11
2

You could use the unambiguous HTML syntax:

<em><strong>Some_Text</strong></em>

Some_Text

Or even mix the two:

<em>**Some_Text**</em>

Some_Text

2
  • That's what I did for my immediate need, but I'm just raising a flag on the bug. Thanks for the other workaround though.
    – MPelletier
    Oct 15, 2011 at 11:35
  • 1
    @MPelletier I'm not sure it's a bug per se. Could just be a syntactical ambiguity. As ChrisF pointed out, asterisks and underscores work very similarly in Markdown.
    – a cat
    Oct 15, 2011 at 13:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .