Yue Yi <[email protected]> writes:

> - This is test
> - term :: item
> - continue
>
> In this case, the term :: is stripped because the entire structure is
> identified as a plain unordered list rather than a description list.
>
> In `org-html-item', ITEM's type depends on its parent, i.e.,
> plain-list. If the first item is unordered list, then it's regarded as
> unordered list:
>
> (let* ((plain-list (org-element-parent item))
>        (type (org-element-property :type plain-list))
>        ...)
>   ...)
>
> In `org-html-format-list-item', only when type is `descriptive', the
> TERM component will be extracted and added as <dt> tag in HTML. This
> means when descriptive item exists in other type plain list, it'll be
> treated as other type and omit the TERM.
>
> I would like to discuss whether this behavior is reasonable. In my
> opinion, it is.
>
> Technically, we could modify the code so that when an "a :: b" structure
> appears in an item other than the first one (within a list not
> identified as descriptive), the TERM is preserved as plain text instead
> of being treated as a <dt> tag. However, it is debatable whether this is
> truly necessary.
>
> If a user needs to include such a pattern without it being interpreted
> (and thus stripped) as a term, they can explicitly avoid the issue by
> escaping the entries:
>
> - This is test
> - term \colon\colon item
> - continue

IMHO, ignoring parts of the items is a bug - we are loosing information
from the original Org document for no good reason.
Let me frame this differently - what is the benefit of stripping tag
from the item? When could it be intentional?

Yes, users can do - term \colon\colon item, but that's not intuitive.
I would opt for this approach if tripping tag were justified for some
use cases, but I do not see how it is.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to