Last modified: 2012-11-03 03:51:08 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 T43725, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41725 - First character in <pre> stripped and replaced with mw:Placeholder
First character in <pre> stripped and replaced with mw:Placeholder
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 03:28 UTC by Roan Kattouw
Modified: 2012-11-03 03:51 UTC (History)
4 users (show)

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


Attachments

Description Roan Kattouw 2012-11-03 03:28:01 UTC
The following wikitext:

<pre>Foo
Bar
</pre>

yields the following HTML:

<pre><span typeof="mw:Placeholder">
</span>oo
Bar
</pre>

HTML with data-parsoid attributes included:
<pre data-parsoid="{&quot;stx&quot;:&quot;html&quot;,&quot;tsr&quot;:[0,5],&quot;bsp&quot;:[0,19],&quot;dsr&quot;:[0,19]}"><span typeof="mw:Placeholder" data-parsoid="{&quot;src&quot;:&quot;\n&quot;,&quot;dsr&quot;:[5,6]}">
</span>oo
Bar
</pre>

It seems the first character is unconditionally being stripped and replaced with a newline placeholder, even if the first character isn't actually a newline.

I generally don't like the newline placeholder inside <pre>s, and I'd like to get rid of it if possible.
Comment 1 Roan Kattouw 2012-11-03 03:51:08 UTC
Fixed in https://gerrit.wikimedia.org/r/31601 , thanks Subbu!

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


Navigation
Links