Skip to content

Rewriter: text content longer than 65536 chars is truncated #292

Closed
@hedgepigdaniel

Description

@hedgepigdaniel

See minimal reproduction here: https://github.com/hedgepigdaniel/parse5-bug

I tried to find a bug in the parse5-sax-parser but the test I created for it succeeds: https://github.com/inikulin/parse5/compare/master...hedgepigdaniel:test/waterline?expand=1

So I assume that it has something to do with the sourceCodeLocationInfo option passed to the SAXParser by RewritingStream.

An effective workaround is to set RewritingStream().tokenizer.preprocessor.bufferWaterline = Infinity as seen here: https://github.com/hedgepigdaniel/parse5-bug/blob/master/index.js#L7-L8

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions