[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Parsing nested markup objects
From: |
Laith Bahodi |
Subject: |
Parsing nested markup objects |
Date: |
Thu, 8 Jun 2023 04:21:48 -0400 |
Hi! I'm working on a parser for org and I noticed something about
nested markup in the syntax spec: markup starting at the limit of
another object seems like it shouldn't be interpreted as markup. The
spec says that the precondition characters are:
PRE MARKER ...
PRE
Either a whitespace character, -, (, {, ', ", or the beginning of a line.
https://orgmode.org/worg/dev/org-syntax-edited.html#Emphasis_Markers
With links, since `[` isn't in that list, the spec seems to imply the
following wouldn't contain an italic block, but it does:
[[https://example.com][/according to the spec, this shouldn't be marked up/]]
same goes for */abc/* (since `*` isn't in the set defined by PRE)
I understand why it works like this since it's pretty convenient, but
I feel like the details about this interaction should probably be
clarified since it's not quite obvious from the spec (unless I missed
something!).
Also, how are these objects intended to be handled? I couldn't
pinpoint where in `org-element` this is approached.
- Parsing nested markup objects,
Laith Bahodi <=