diff options
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | pygments/formatters/html.py | 4 |
2 files changed, 6 insertions, 1 deletions
@@ -46,6 +46,9 @@ Version 1.6 - The HTML formatter now supports linking to tags using CTags files, when the python-ctags package is installed (PR#87) +- The HTML formatter now has a "linespans" option that wraps every line in a + <span> tag with a specific id (PR#82) + - When deriving a lexer from another lexer with token definitions, definitions for states not in the child lexer are now inherited. If you override a state in the child lexer, an "inherit" keyword has been added to insert the base diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index a0e814ce..02ea6e96 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -296,7 +296,7 @@ class HtmlFormatter(Formatter): `linespans` If set to a nonempty string, e.g. ``foo``, the formatter will wrap each output line in a span tag with an ``id`` of ``foo-linenumber``. - This allows easy access to lines via javascript. + This allows easy access to lines via javascript. *New in Pygments 1.6.* `anchorlinenos` If set to `True`, will wrap line numbers in <a> tags. Used in @@ -306,11 +306,13 @@ class HtmlFormatter(Formatter): If set to the path of a ctags file, wrap names in anchor tags that link to their definitions. `lineanchors` should be used, and the tags file should specify line numbers (see the `-n` option to ctags). + *New in Pygments 1.6.* `tagurlformat` A string formatting pattern used to generate links to ctags definitions. Avaliabe variable are `%(path)s`, `%(fname)s` and `%(fext)s`. Defaults to an empty string, resulting in just `#prefix-number` links. + *New in Pygments 1.6.* **Subclassing the HTML formatter** |