Sorry for the delayed response. I haven't had access to a machine with Emacs over the past few days.
Derek Chen-Becker <[email protected]> 于2026/9/28 Mon 03:04 writes: > Confirmed. > > The patch applies cleanly and all tests pass. It would be nice if there > were a unit test as part of the patch, and although this is a bug fix > I'm wondering if we should update docs/NEWS to clarify the behavior. Indeed, adding a unit test makes total sense here. I have attached the updated patch with a new test case included for review. Regarding etc/ORG-NEWS, In practice, users rarely encounter <h7> (or lower) because the default org-export-headline-levels is 3, and with org-html-toplevel-hlevel defaulted to 2, standard exports only reach <h4> at most. If we view falling back or capping headings beyond HTML's standard as a notable behavioral change in export output, documenting it in NEWS is worthwhile. If we treat it purely as an internal bug fix to ensure valid HTML markup, it might not be strictly necessary. I personally lean towards mentioning it in NEWS for transparency, but I am happy to defer to the maintainers' preference. If you want, it can be: *** ox-html now exports headings lower than <h6> as list items HTML only defines heading tags up to <h6>. Previously, when the level of a headline exceeded 6, the HTML exporter emitted invalid tags like <h7>. This could happen with a large org-html-toplevel-hlevel together with a deep H export option, e.g. #+OPTIONS: H:10. Now, such headlines are exported as list items, just like other low-level headlines. Regards.
0001-lisp-ox-html.el-Do-not-emit-headings-deeper-than-h6.patch
Description: Binary data
