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

       Web browser: ---
            Bug ID: 58059
           Summary: Adaptive pre serialization
           Product: Parsoid
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: serializer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

In HTML, pre can contain nested elements and formatting. This is also true in
VE. In wikitext, formatting in pre is only supported when using the indent-pre
serialization. The downside of the indent serialization is that 

1) HTML tags in text need to be entity-escaped (ugly wikitext), and 
2) trailing newlines require workarounds with <nowiki/> or <br>.

The best serialization strategy thus depends on the content of the pre. We
should serialize modified or new pre elements to

1) html-syntax pre if the text content contains html tags but no elements, and
2) indent pre syntax if the content contains elements. Trailing newlines in
HTML "<pre>foo\n\n</pre>" need to be protected with a trailing <nowiki/> as in
" foo\n \n <nowiki/>".

-- 
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