ubermichael / isetools

Tools for parsing data for the Internet Shakespeare Editions
GNU General Public License v2.0
2 stars 3 forks source link

TagNode text is missing whitespace #22

Closed telic closed 9 years ago

telic commented 9 years ago

The text property of TagNodes appears to be getting set improperly by the parser.

For example, parsing the document

<hello world="foo"/>

results in a TagNode with a text value of

<helloworld="foo"/>
ubermichael commented 9 years ago

I’ve noticed that too. It seems like the space is getting swallowed up by the Antlr grammar/parser but I’m not sure what to do about that.

On Jun 23, 2015, at 2:39 PM, Maxwell Terpstra notifications@github.com wrote:

The text property of TagNodes appears to be getting set improperly by the parser.

For example, parsing the document

results in a TagNode with a text value of

— Reply to this email directly or view it on GitHub.

telic commented 9 years ago

Is this perhaps the problem/solution? https://theantlrguy.atlassian.net/wiki/pages/viewpage.action?pageId=4816925

I noticed TAG_WS uses skip.

ubermichael commented 9 years ago

That was exactly the problem! Thanks Max. Change committed in the master branch.