Last modified: 2013-06-11 23:26:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41352, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39352 - Minimize unnecessary nowiki tags around quote marks
Minimize unnecessary nowiki tags around quote marks
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
serializer (Other open bugs)
unspecified
All All
: Low normal
: ---
Assigned To: Gabriel Wicke
:
: 47442 (view as bug list)
Depends on:
Blocks: 39567
  Show dependency treegraph
 
Reported: 2012-08-14 20:56 UTC by ssastry
Modified: 2013-06-11 23:26 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description ssastry 2012-08-14 20:56:27 UTC
The current wikitext escape algorithm adds excessive nowiki tags around quote marks.  While these are semantically correct and useful, for existing code, it introduces dirty diffs with the source wikitext.

This is not a problem if unmodified DOM subtrees are serialized using original wikitext source.  But, we dont this right now.

Till such time, the code needs fixing to use heuristics to eliminate nowikis where the parser can figure out the right parse without nowikis.
Comment 1 Gabriel Wicke 2012-08-14 21:13:54 UTC
Since quote heuristics are relatively complex, I guess the simplest and most reliable solution to figure out if escaping for quotes in a line is really needed would be to round-trip test the output for that line.
Comment 2 James Forrester 2013-04-20 15:09:13 UTC
*** Bug 47442 has been marked as a duplicate of this bug. ***
Comment 3 Quim Gil 2013-04-20 18:46:44 UTC
Note also that through continuous edits more cruft might be added around the same source text, and at some point ugly visual changes do occur.

See the bold text at http://en.wikipedia.org/w/index.php?title=Yolanda_Ordaz_de_la_Cruz&oldid=551330208#Impact . It appeard through several edits, each one adding a bit.

See the diff of the fix:

http://en.wikipedia.org/w/index.php?title=Yolanda_Ordaz_de_la_Cruz&diff=551330391&oldid=551330208
Comment 4 Gabriel Wicke 2013-04-22 04:38:05 UTC
(In reply to comment #3)
> Note also that through continuous edits more cruft might be added around the
> same source text, and at some point ugly visual changes do occur.

This is VisualEditor bug 47434, which is fixed in VE master, but not yet deployed.
Comment 5 Gabriel Wicke 2013-06-11 23:26:07 UTC
We are using selective serialization by default, so this is no longer a major issue in practice.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links