Hello, Emacs Org-mode maintainers,
In a recent exchange, Ihor pointed out a specific behavior regarding
mixed list items:
- 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