Skip to content

Migrate regex chunkers to tree-sitter(Latex, SLN, Razor, Markdown) #10

Closed

Description

@Crysthamus

tree-sitter-wasm provides parsers for all four regex based chunkers, i.e Latex, SLN, ,Razor, and Markdown, if you would like to move away from regex, please let me know and I could draft a PR.

Activity

  1. MrDoe commented on Jun 18, 2026

    @MrDoe
    Owner

    Hey,

    thanks a lot for the suggestion and for putting together the fork - it's impressive that you've got all four (LaTeX, Razor, SLN, Markdown) building as WASM.

    I thought about it and landed on a compromise: I'd be happy to adopt the Markdown grammar from @tree-sitter-grammars/tree-sitter-markdown (official org package). For the other three I'd prefer to keep the current regex-based chunkers for now.

    The reason is security - pre-built WASM binaries from a third-party fork are a supply-chain risk I'm not comfortable with (especially after incidents like xz). I don't know you, you don't know me, and those binaries would need an intensive review before landing in the users' node_modules. That's not a reflection on your work - it's just a policy I want to stick to.

    Thanks again for reaching out!

  2. Crysthamus commented on Jun 18, 2026

    @Crysthamus
    Author

    Supply-chain security is indeed a very tense landscape right now. Though, for the WASMs I do ensure they are built directly and signed in GitHub Actions and I do review all commits myself before updating the parsers. The github parsers are all pinned to specific commits for reproducibility, and updates are delayed by a few days to minimize risk.

    However, I do recognize where you are coming from, and respect your decision I will try to look into ways to make the build process more secure, thanks for the feedback.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions