Skip to content

Rules for source dump character escape changed in V8 #38

@mraleph

Description

@mraleph

As a result unescaping code

try {
if (lines.length == 1) {
final String line = lines.first;
if (line.contains(r"\x0a")) {
lines = line.replaceAllMapped(new RegExp(r"\\(x[a-f0-9][a-f0-9]|u[a-f0-9][a-f0-9][a-f0-9][a-f0-9])"), (m) => new String.fromCharCode(int.parse(m.group(1).substring(1), radix: 16)))
.split('\n');
}
}
} catch (e) {
print(e);
}

no longer works. It is not obvious to me how to fix this because I don't see a backwards compatible way to detect whether escaping was applied or not.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions