shrface
shrface copied to clipboard
Trying to use shrface-outline-cycle(-buffer) getting error `Before first heading` always
Opened the https://github.com/chenyanming/shrface in eww, trying to cycle and it throws me that error.
My current setup: https://0x0.st/X4oy.bin
The problem is in the HTML. <h2 class="sr-only">Navigation Menu</h2>. There is no preceding h1 to get a level-1 org heading.
Avenues of investigation.
- advice
markdown-back-to-heading-over-code-blockinmarkdown-mode.el(or wherever the appropriate place is) to use a different more flexible regexp to locate headings - perform replacement in HTML before rendering such that a
h1always exists. So<h2 classbecomes<h1 class,<h3 classbecomes<h2 classand so on. I tried this on an epub and while it renders correctly folding doesn't work as intended.
Edit: Upon further testing I'm not so sure my conclusions are actually correct. The epub I thought was broken now folds properly, opened in both nov and eww.