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

       Web browser: ---
             Bug #: 41715
           Summary: Parsoid "should" eat whitespace before [[Category:]]
                    tags
           Product: Parsoid
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---


For compatibility with the PHP parser, I would like Parsoid to mimic this
completely insane behavior: all whitespace preceding [[Category:Foo]] is eaten.

So for instance, "Foo [[Category:Bar]]Baz" renders as "<p>FooBaz</p>",
"Foo\n\n\n\n[[Category:Bar]]Baz" also renders as "<p>FooBaz</p>", and
"Foo\n\n\n\n[[Category:Bar]]\nBaz" renders as "<p>Foo\nBaz</p>". Meanwhile,
whitespace *after* categories is processed normally, so
"Foo[[Category:Bar]]\n\nBaz" renders as "<p>Foo</p><p>Baz</p>".

I realize this is totally insane behavior, but I'm having problems in VE
because Parsoid isn't currently doing this:
1) these cases render differently in the editor than they do in the actual
article
2) lists of categories at the end of the page end up as long strings of newline
characters in the editor

I could work around this in the editor to some degree, but it's tricky because
only categories exhibit this behavior, magic words don't. "Fixing" it in
Parsoid would be nicer. Of course, the whitespace that's being stripped would
still have to be put in round-trip data and be restored by the serializer.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
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