allow '=' in pygmentize option arguments

Issue #282 resolved
Former user created an issue

My defective command is as follows, seems quite sensible....

{{{ diff whatever whatever.else | pygmentize -l diff -f html -O style=colorful,full=1,title="<a href='someurl'>Some URL</a>" }}} alas, produces just "<h2></h2>" where the title tag would go

but try that with {{{ diff whatever whatever.else | pygmentize -l diff -f html -O style=colorful,full=1,title="<a>Some URL</a>" }}} and though you've got a useless <A> tag in your <h2> there, at least it printed....

Why can't I have a link in my title?

Granted, {{{ pygmentize -V Pygments version 0.7.1, (c) 2006 by Georg Brandl g.brandl@gmx.net. }}} I have not the latest, is it fixed?

Reported by guest

Comments (12)

  1. Anonymous

    Well, I found another machine to play with, and sadly, v0.9 is afflicted as well

    My opinion is that it's related to parsing the "-O" string and using an "=" in the value given to 'title' will break it, pygmentize will treat the 'href' as an option to itself

  2. Anonymous

    ugly workaround:

    diff whatever whatever.else | \\
    pygmentize -l diff -f html -O style=colorful,full=1,title="~" |  \\
    sed "s|<h2>~</h2>|<h2><a href='someurl'>Some URL</a></h2>|"
    
  3. Log in to comment