linebuffer: add strictness options
When the buffer was separated from the tokenizer, we lost some validation, including really aggressive carriage return detection. This brings this back in full force and adds some additional validation on top of it.
This commit is contained in:
@@ -15,9 +15,7 @@ pub fn main() !void {
|
||||
var needfree = true;
|
||||
defer if (needfree) allocator.free(data);
|
||||
|
||||
var parser = nice.Parser{ .allocator = allocator };
|
||||
|
||||
const document = try parser.parseBuffer(data);
|
||||
const document = try nice.parseBuffer(allocator, data, .{});
|
||||
defer document.deinit();
|
||||
|
||||
// free data memory to ensure that the parsed document is not holding
|
||||
|
Reference in New Issue
Block a user