Skip to content

Pin bs-highlighter for now - #318

Closed
jakearchibald wants to merge 1 commit into
whatwg:mainfrom
jakearchibald:jakearchibald/fix-docker-build
Closed

jakearchibald wants to merge 1 commit into
whatwg:mainfrom
jakearchibald:jakearchibald/fix-docker-build

Conversation

@jakearchibald

Copy link
Copy Markdown

The latest bs-highlighter broke the build. From Claude:

The 3.x line re-escapes < as &lt; in highlighted IDL blocks; Wattsi re-parses the highlighter's output as IDL and chokes on Promise&lt;undefined>. So the build broke.

@tabatkins can you give me more details around the change? It might make more sense to just change Wattsi.

@tabatkins

tabatkins commented Aug 13, 2026 •

Copy link
Copy Markdown

As I said to Sam in tabatkins/highlighter#38 (comment), I've altered the defaults to make more sense in general, so you have to reapply those two settings yourself. (Previously, the "server" script was just something I threw together solely for wattsi itself; while revisiting the code I fixed it up to its own command and made sure it worked decently in general.)

@tabatkins

tabatkins commented Aug 13, 2026 •

Copy link
Copy Markdown

(I only use escape HTML in the output when spitting out HTML text, as is necessary for it to be valid. If it's JSON it shouldn't be doing any escaping. But I also have an option to unescape the input json-HTML when it (incorrectly) contains escapes in its text, I think because that's how wattsi happened to hand it to me.)

Edit: Confirmed in my test file that my escaping works as expected; the issue is indeed that wattsi is feeding it (incorrectly) escaped text but the unescape param is no longer passed, so it just spits that back out.

@tabatkins

Copy link
Copy Markdown

@jakearchibald
jakearchibald marked this pull request as draft August 13, 2026 16:26
@jakearchibald

Copy link
Copy Markdown
Author

Cheers @tabatkins. I'll look at a proper fix.

@tabatkins

Copy link
Copy Markdown

If it would be easier, I could probably make the bs-highlighter-server command take defaults, so you'd just need to update the build.sh here rather than updating wattsi. (But if making the edit isn't troublesome, it's an easy fix.)

@tabatkins

Copy link
Copy Markdown

Oh btw Jake, Claude got the problem exactly backwards. ^_^ It's bs-highlighter that's parsing as WebIDL and choking on the Promise&lt;undefined> from the input. As a result it doesn't even emit any output; it returns a 400 response with the IDL SyntaxError instead.

@jakearchibald

Copy link
Copy Markdown
Author

Haha yes, I've just figured that out too haha

@jakearchibald

Copy link
Copy Markdown
Author

PR whatwg/wattsi#168

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants