Skip to content

Conversation

@matthew-hre
Copy link
Contributor

The HTML page formatter can now track hyperlink state so tags open and close when the OSC 8 data changes. Also added a new writeHtmlEscaped helper to keep generated markup safe.

Originally written with Copilot, revised by hand.

@matthew-hre matthew-hre requested a review from a team as a code owner October 30, 2025 19:19
Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think there's some stylistic stuff to improve. I only noted one major issue though.


/// Write a string with HTML escaping. Used for escaping href attributes
/// and other HTML attribute values.
fn writeHtmlEscaped(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should already have this helper somewhere, writeCodepoint I think. Should be reused.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Should be good now!

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