Last modified: 2012-11-06 18:03:41 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.
Great that you are handling <br> now ;) Removed the protection in https://gerrit.wikimedia.org/r/#/c/31958/.
(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>.
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.
The pre protection, that is.
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.