Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add option to include parse tokens in serialize #1741

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tim-evans
Copy link
Collaborator

@tim-evans tim-evans commented Apr 2, 2024

This adds an option to include parse tokens in serialization to Peritext, which is helpful in cases where someone wants to view source of a document in a case like viewing the HTML tokens of the document, while allowing for text highlighting. The feature is also useful for debugging cases where you may want to see if some data is getting truncated unintentionally.

A feature like this was used for the hytradboi talk I did on wikitext parsing. In trying to ensure that everything is working well on main with the quite extensive changes in the last year, I'm trying to update that project to see if there are any issues with the new format :)

Regardless of this feature, the changes to the sortTokens function may improve performance in some cases and be more legible for other developers

@tim-evans tim-evans force-pushed the include-parse-tokens-option branch from 7d21f5b to e784fe2 Compare April 2, 2024 16:44
@tim-evans tim-evans force-pushed the include-parse-tokens-option branch from e784fe2 to 1567783 Compare April 2, 2024 18:33
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.

1 participant