1. Pepijn de Vos
  2. pygments-main

Commits

Pepijn de Vos  committed 6b735f1

fix for possible mutiline names

  • Participants
  • Parent commits bc24b07
  • Branches default

Comments (0)

Files changed (1)

File pygments/formatters/html.py

View file
                     base, filename = os.path.split(filename)
                     filename, extension = os.path.splitext(filename)
                     url = urlformat.format(path=base, fname=filename, fext=extension)
-                    parts[0] = "<a href=\"%s#%s-%d\">%s" % (url, self.lineanchors, linenumber, value)
+                    parts[0] = "<a href=\"%s#%s-%d\">%s" % (url, self.lineanchors, linenumber, parts[0])
                     parts[-1] = parts[-1] + "</a>"
 
             # for all but the last line