Last modified: 2012-11-06 18:03:41 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 T43753, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41753 - Parsoid: Please remove mw:Placeholder wrapper for first newline in <pre>
Parsoid: Please remove mw:Placeholder wrapper for first newline in <pre>
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-03 21:40 UTC by Roan Kattouw
Modified: 2012-11-06 18:03 UTC (History)
4 users (show)

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


Attachments

Description Roan Kattouw 2012-11-03 21:40:34 UTC
Parsoid currently wraps the first newline in a <pre> in <span typeof="mw:Placeholder"> , see also bug 41725 where I reported a bug in this behavior. Because of the way this interacts with VisualEditor, I would like Parsoid to drop this wrapping altogether. The reason for mw:Placeholder wrapping is supposed to be to protect things from VE, but we don't need it here and it's actually causing problems.
Comment 1 Gabriel Wicke 2012-11-05 22:25:28 UTC
Great that you are handling <br> now ;) Removed the protection in https://gerrit.wikimedia.org/r/#/c/31958/.
Comment 2 Roan Kattouw 2012-11-06 00:01:53 UTC
(In reply to comment #1)
> Great that you are handling <br> now ;) Removed the protection in
> https://gerrit.wikimedia.org/r/#/c/31958/.
I wasn't talking about <br>s at all, I was talking about the first newline in a <pre>.
Comment 3 Gabriel Wicke 2012-11-06 00:13:19 UTC
Ooops, sorry- read that too fast on Friday and just acted based on that distant memory today ;) The protection is back now. Will see about removing the protection later.
Comment 4 Gabriel Wicke 2012-11-06 00:13:33 UTC
The pre protection, that is.
Comment 5 Gabriel Wicke 2012-11-06 18:03:41 UTC
The right kind of protection is removed in https://gerrit.wikimedia.org/r/#/c/32003/. We had to perform some tricks to preserve the newline after the opening pre tag in the treebuilder. The HTML spec makes that newline optional, so it seems that DOM implementations are free to discard it and still be compliant with the spec. This might or might not bite you.

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


Navigation
Links