What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

I'm trying to make symbols italic, both in front and inside a bracket. So I wrote *foo*[*bar* + 1]. The system renders this as “foo[*bar* + 1]”, which at the time of this writing means “foo[*bar* + 1]” (I hope this latter rendering will remain unchanged over time).

I tried some alternatives. The input

1. *foo*[*bar* + 1]
2. foo[*bar* + 1]
3. *foo[*bar* + 1]
4. *foo*(*bar* + 1)
5. *foo*{*bar* + 1}
6. *foo*<*bar* + 1>
7. *foo*[<em>bar</em> + 1]

renders like this:

  1. foo[*bar* + 1]
  2. foo[bar + 1]
  3. *foo[bar + 1]
  4. foo(*bar* + 1)
  5. foo{*bar* + 1}
  6. foo<bar + 1>
  7. foo[bar + 1]

So either use of italics, immediately before or immediately inside the bracket, works well enough. It's only when they both coincide that things break down. Could be due to regular expression matching, that the [ already matched at the end of one italic span, and therefore won't match at the beginning of the next. round parentheses are affected as well, as are curly braces. Angled braces, however, appear not to suffer from this. Perhaps the regular expression is operating on the &lt; version of the text?

Any chance of fixing this inconsistency?

share|improve this question
    
Why should this be reopened? –  Martijn Pieters Nov 16 '12 at 21:15
    
@MartijnPieters This is a completely separate issue. –  Tim Stone Nov 16 '12 at 21:17
    
@TimStone: Right, I'd have loved an explicit comment to that effect, for us in the Reopen-votes queue. :-) –  Martijn Pieters Nov 16 '12 at 21:20
    
Oh, so my question was closed as duplicate and then reopened again, while I wasn't looking? I seem to have a knack for asking such questions. I assume that this post was the presumed duplicate, as it appears here as linked but I see no real link to it. –  MvG Nov 16 '12 at 21:40
    
@MvG: That's correct. –  Martijn Pieters Nov 17 '12 at 8:42
add comment

2 Answers

If my assumption about a regular expression matching the bracket at the end of the first range is correct, then perhaps this can be fixed by turning the character past the closing * from part of the matched text into a positive look-ahead assertion.

share|improve this answer
add comment

This had little to do with parentheses per se; rather it was a form of this issue, where a single character wasn't enough between to instances of italics. That was fixed, so after the next build it will all render as expected.

share|improve this answer
add comment

You must log in to answer this question.

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