https://bugzilla.wikimedia.org/show_bug.cgi?id=48891

--- Comment #26 from [email protected] ---
The patch will work with Parsoid right now, because Parsoid always goes through
the PHP parser when dealing with extensions and tag hooks. But, there are plans
for Parsoid to bypass the PHP parser and call the extensions/hooks directly.

Right now, The translate code preprocesses the page by stripping the
<translate> and <tvar> tags before the PHP parser actually parses the page
source (by registering for ParserBeforeStrip hook). So, even though the tag
hooks are registered (with a callback that bombs if called), the PHP parser
never gets to calling them.

If Parsoid is able to mimic the behavior (by calling all hooks, not just
extension callback hooks), the existing code will continue to work. However, if
Parsoid only supports tag extensions directly, then, the ParserBeforeStrip code
won't be invoked by Parsoid at that time and this will be a problem at that
point.

So, this is not an issue *right now*, but could be at a later point depending
on what functionality Parsoid will implement natively and what it will continue
to defer to the PHP parser. 

I think Gabriel was responding to that future concern and also hoping that we
can use the opportunity of Parsoid's ongoing development to cleanup some of
these interfaces and mechanisms. We could streamline extensions to go through
narrow interfaces rather than continuing to use all sort of hooks into various
points of the parsing timeline. Anything this is something we could discuss
more.

Hope this summarizes where we stand now.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to