Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug with ** and ` #189

Closed
summivox opened this issue Jul 10, 2013 · 3 comments
Closed

bug with ** and ` #189

summivox opened this issue Jul 10, 2013 · 3 comments
Labels

Comments

@summivox
Copy link

Testcase:

**a`b**c`d**

The middle

`b**c`

Should really be inline <code>, but now marked outputs:

<p><strong>a`b</strong>c`d**</p>

Expected:

<p><strong>a<code>b**c</code>d</strong></p>
@maxkorp
Copy link

maxkorp commented Jul 24, 2013

Took a quick look at this. I'm not much with regexes, so I've not had much luck yet, but a bit of an observation at least.
Even flipping the code/strong markdown, it still breaks. However, if you use EMs in place of the strong tag, it works, ie

_a**b_c**d_

whereas

**a_b**c_d**

does not. So the same error exists within both the regex for strong tags and inline code tags, but not in the regex for em tags.

@summivox
Copy link
Author

As I also submitted a PR on adding math, I must admit that using regex is not that brilliant, after all.
It looks like a pushdown-automata equivalent to me (rather than regular), although with current regex I doubt it's still doable, just it takes some careful reasoning (and probably rewriting, too).
Fortunately I heard some brilliant guys are working on a unified markdown standard that could hopefully iron out all these subtle differences and bugs.

@joshbruce
Copy link
Member

Closing as not part of the current focus and possibly covered by spec compliance work, see also #1106 and #1216.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants