1. Georg Brandl
  2. pygments-main


Georg Brandl  committed 6892b61

HTML formatter: add / to path in ctags linking if nonempty; fix spelling.

  • Participants
  • Parent commits 4d81fa1
  • Branches default

Comments (0)

Files changed (1)

File pygments/formatters/html.py

View file
  • Ignore whitespace
         A string formatting pattern used to generate links to ctags definitions.
-        Avaliabe variable are `%(path)s`, `%(fname)s` and `%(fext)s`.
+        Available variables are `%(path)s`, `%(fname)s` and `%(fext)s`.
         Defaults to an empty string, resulting in just `#prefix-number` links.
         *New in Pygments 1.6.*
                 filename, linenumber = self._lookup_ctag(value)
                 if linenumber:
                     base, filename = os.path.split(filename)
+                    if base:
+                        base += '/'
                     filename, extension = os.path.splitext(filename)
                     url = self.tagurlformat % {'path': base, 'fname': filename,
                                                'fext': extension}