Skip to content

Implement asciidoc support using the asciidork parser crate#189

Draft
jamesmunns wants to merge 1 commit into
bearcove:mainfrom
jamesmunns:james/asciidoc2
Draft

Implement asciidoc support using the asciidork parser crate#189
jamesmunns wants to merge 1 commit into
bearcove:mainfrom
jamesmunns:james/asciidoc2

Conversation

@jamesmunns
Copy link
Copy Markdown

This is a draft PR that adds support for asciidoc formatted spec files. It was written considering #185 as an inspiration.

This was largely implemented by claude, I've included the original plan (asciidoc_plan.md) for review, as well as one major rework that was done post-original plan (unhand-plan.md), which removed a hand-rolled parser that claude originally wrote, in favor of using asciidork's parser instead.

I'm going to take this for a spin and see if it generally works, but an initial smoke test shows it is at least partially working:

Screenshot 2026-05-01 at 5 44 39 PM

@jamesmunns
Copy link
Copy Markdown
Author

(I do plan to remove the plan files + squash them out before merging, but I figured they might be useful for reviewing)

@fasterthanlime
Copy link
Copy Markdown
Contributor

I'm afraid strictdoc got there first and you probably have a heck of a rebase ahead of you! Sorry!

@fasterthanlime
Copy link
Copy Markdown
Contributor

you probably have a heck of a rebase ahead of you!

You or my claude. We'll see.

@jamesmunns
Copy link
Copy Markdown
Author

Happy to throw your claude or my claude at it, you might be able to guide more intelligently than I can. Definitely still interested in seeing this land, but I did run into some speed bumps of "difference in semantics between markdown and asciidoc" that caused some weirdness while trying to annotate https://hubris.oxide.computer/reference.

The big weirdness is that asciidoc allows for making an "aggregate" doc out of multiple files (sort of like mdbook's SUMMARY.md, but built into the spec), in a way that the current PR doesn't handle well.

There's ALSO some weirdness that asciidoc's = TITLE, which SEEMS similar to markdown's # TITLE, is actually a "document" title, not an <h1>, and the current PR just kinda... ignores that in the rendered output? Unsure exactly what the right way to fix this is.

I don't think this is a blocker, I think if it rebases cleanly it would still be worth merging as-is, and cleaned up/extended in follow-on. We might just not want to start shouting "full support for asciidoc" until we've smoothed down some more edges :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants