Last modified: 2014-08-07 11:06:00 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 T49936, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47936 - Implement <section> natively in Parsoid, possibly as plain HTML5 content
Implement <section> natively in Parsoid, possibly as plain HTML5 content
Status: NEW
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Low normal
: ---
Assigned To: Gabriel Wicke
:
: 52252 (view as bug list)
Depends on: 51562
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-01 15:48 UTC by ssastry
Modified: 2014-08-07 11:06 UTC (History)
5 users (show)

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


Attachments

Description ssastry 2013-05-01 15:48:23 UTC
<section> extensions get parsed as plain text on mediawiki.org which then causes them to be wrapped in nowiki-tags on save if any paragraph with this tag is edited.

Bug report: /mnt/bugs/2013-05-01T14:00:52.600Z-Echo_(Notifications)%2Fstatus
Comment 1 Gabriel Wicke 2013-05-01 16:47:42 UTC
<section> is an HTML5 element, so is currently not considered as a potential extension tag in the tokenizer. We can easily consider it as an extension tag (similar to <source>), but then its content will only be editable as wikitext unless we implement custom rendering for this extension tag that exposes its content as editable HTML. Since sections are large parts of the page, I'd suggest to only treat this as an extension once we have specialized editing support for its content.
Comment 2 Andre Klapper 2013-07-04 10:33:47 UTC
[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]
Comment 3 Gabriel Wicke 2013-08-13 21:09:25 UTC
*** Bug 52252 has been marked as a duplicate of this bug. ***
Comment 4 Matthew Flaschen 2013-08-14 17:27:33 UTC
The problem with treating it as native HTML <section> element is that it doesn't really use HTML-like syntax.

As noted at https://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion#Step_1:_Mark_off_sections, the syntax uses what looks like self-closing tags, with the real content in between:

<section begin=chapter1 />this is a chapter<section end=chapter1 />

This is not how an HTML5 section tag (http://html5doctor.com/the-section-element/), or really any HTML tag, works.

See also my comment (based on a real example) and link at bug 52252.
Comment 5 Matthew Flaschen 2013-08-14 17:30:26 UTC
It could still probably be mapped to a real section tag, similar to how other wikitext syntax is (e.g. == Heading == is more or less mapped to <h2>Heading</h2>).
Comment 6 Gabriel Wicke 2013-08-14 17:40:04 UTC
(In reply to comment #5)
> It could still probably be mapped to a real section tag, similar to how other
> wikitext syntax is (e.g. == Heading == is more or less mapped to
> <h2>Heading</h2>).

It should not be hard to perform this mapping in Parsoid while converting from wikitext to HTML. We will also need to map custom extension attributes to valid HTML attributes.

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


Navigation
Links