1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 00:44:57 +03:00

Assign text content onto the leaf itself.

This reverts commit aad05e5a2b6650318b5ec04784edbba7614d1224.
This commit is contained in:
Rob Rix 2015-10-21 16:56:23 -04:00
parent 699e6ee30d
commit 13737b7fe7

View File

@ -61,7 +61,7 @@
this.range = json.extract;
this.syntax = syntax(json.unwrap, function(x) { return new Term(x, source); });
if (this.syntax instanceof Leaf) {
this.textContent = source.substr(this.range[0], this.range[1] - this.range[0]);
this.syntax.textContent = source.substr(this.range[0], this.range[1] - this.range[0]);
}
return this;
}