Page MenuHomePhabricator

Collection extension supports <source>, but not <syntaxhighlight>.
Closed, ResolvedPublic

Description

Author: solidsnake63

Description:
Example of ignored tag in PDFs

Would love to have it so if a PDF is generated, the syntax highlighting is shown in the document as it appears on the wiki page. Currently, the formatting isn't shown and the wiki tag can be seen (which is not very helpful).

Is there any way to have it so the highlighting works within a generated PDF? Would be very helpful if possible.


Version: unspecified
Severity: normal
OS: Windows 7
Platform: PC

Attached:

example.png (108×983 px, 27 KB)

Details

Reference
bz29136

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:29 PM
bzimport added a project: Collection.
bzimport set Reference to bz29136.

solidsnake63 wrote:

The extension used to generate the PDF's can be found here (in case you need it):

http://www.mediawiki.org/wiki/Extension:Collection

This probably should be moved under collection, unless the plugin is supposed to do something for the printable version, but doesn't.

Looking at http://en.wikipedia.org/w/index.php?title=User:Reedy/Test&printable=yes at the moment, it looks fine

I used <source></source> and it generated a PDF that looks fine..

http://en.wikipedia.org/w/index.php?title=Special:Book&bookcmd=download&collection_id=00598fd294bdb2b3&writer=rl&return_to=User%3AReedy%2FTest

It seems to be <syntaxhighlight></syntaxhighlight> isn't supported, but <source></source> is

solidsnake63 wrote:

Thank you for the feedback Reedy. Your quick response is appreciated.

It appears that you are right in that the <source> tag will work for PDFs, however the <syntaxhiglight> tag will not. I will try and use this tag instead and should I have anymore issues, I will open a bug for the collection extension.

I'll mark this as resolved.

ran.arigur wrote:

Reopening: I'm glad there's a workaround for this, but I think the extension nonetheless needs to be changed to support <syntaxhighlight>.

volker.haas wrote:

The syntaxhighlight tag will now be treated exactly like a source tag.

https://github.com/pediapress/mwlib/commit/571c2059cd8b9eb757740063e3d6cfd4a2b55580

Note that the wikipedia renderservers haven't been updated yet.