Page MenuHomePhabricator

QuoteTransformer and quote-tokens use a ".value" property on the token instead of adding it to the token's attributes
Closed, ResolvedPublic

Description

The PEG tokenizer adds a quote token's string value as a ".value" attribute after-the-fact instead of stuffing it as an attribute of the token.
Consequently, the QuoteTransformer uses ".value" instead of token.getAttribute('value').
Presumably, this was either an oversight or a premature performance optimization (see T205479: Fix token datastructure to fix potential perfomance issue).

This should be fixed.

Event Timeline

ssastry triaged this task as Medium priority.Sep 25 2018, 8:53 PM
ssastry moved this task from Backlog to Parsoid Fixes on the Parsoid-PHP board.

Change 480552 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] QuoteTransformer quote tokens don't need to be special snowflakes

https://gerrit.wikimedia.org/r/480552

Change 480552 merged by jenkins-bot:
[mediawiki/services/parsoid@master] QuoteTransformer quote tokens don't need to be special snowflakes

https://gerrit.wikimedia.org/r/480552