Skip to content

Precedence between two "text" constructs #80

Answered by wooorm
StaloneLab asked this question in Q&A
Discussion options

You must be logged in to vote

hey hey!

That conflicts a bit with markdown:

*a~b*c~

~a*b~c*

Yields:

a~bc~

a*bc*

So the earlier one “wins”.
That’s because emphasis/strong/delete/link/image are parsed separately: as potential starts/ends, and finally when done resolved based on whether they match and which comes first, and the starts/ends that don’t match reverted back to text.

But, kbd could perhaps be parsed similarly to code / math? So that it parses from start to end in one go.

And then its contents chunks could be linked to form more text? That would be similar to titles (but then using text instead of string as the content type)

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@wooorm
Comment options

@StaloneLab
Comment options

@wooorm
Comment options

@wooorm
Comment options

@StaloneLab
Comment options

Answer selected by StaloneLab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants