Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: >> My intuition says that the current parser behaviour is not correct. It >> would make more sense to prioritise link over italics. However, it would >> require a major change in the parser - instead of a single pass, the >> parser may parse different types of objects sequentially. The emphasis >> objects should come last avoiding the markers to have different parents. >> >> Nicolas, WDYT? > > I disagree. Priority should be given to the first object being started. > This is, IMO, the only sane way to handle syntax.
Multi-pass may indeed over-complicate the syntax. However, it is not clear then how to handle situations like /A link [[https://orgmode.org/?oops=true][Org Mode]] or /A code ~user/?my-user-variable~ with slash/ or /A verbatim =text/.= with slash/ Should we modify the closing-re for emphasis? >> (seq (not space) >> (group ,mark) >> (or (any space ?- ?. ?, ?\; ?: ?! ?? ?' ?\" ?\) ?\} ?\\ ?\[) >> line-end)) Best, Ihor