Page MenuHomePhabricator

download as pdf does not take the tag <code> into account
Closed, ResolvedPublic

Description

Author: bobby.prani

Description:
downloaded pdf from wikipedia

when you download an article on wikipedia as a pdf, it does not take the tag <code> into account. Because of this, the formatting in the pdf is changed compared to the formatting in HTML.

Example:http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm

The worked examples in the algorithm are all as plain text when viewed in the pdf.

Compare with Print-to-pdf in Firefox which gives similar formatting.


Version: unspecified
Severity: normal

Attached:

Details

Reference
bz29354

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:31 PM
bzimport added a project: Collection.
bzimport set Reference to bz29354.

bobby.prani wrote:

print-to-pdf from firefox

Attached:

<source></source> works fine though

I'm not sure if this is a dupe, as I remember discussing with someone about this recently.

But that might've been on IRC

There's a couple of very similar related bugs about too

I don't know anything about the mwlib software, but just from the context in the diff [0] it looks like you have it backwards. Shouldn't it be "Code: [PreFormatted]" not the other way around?

[0] http://code.pediapress.com/git/mwlib?p=mwlib;a=commitdiff;h=82c91f7ff491961db48fd309866ab7eafb459564

volker.haas wrote:

I tested the change and it works. But I agree, the diff (and the "configuration" of "forbidden_parents") looks wrong. When I came up with that type of mapping it probably made sense. But from todays perspective the configuration looks pretty stupid. Maybe I'll change it some day...

Fair enough, thanks for clarifying :)