Allows Typogrify to ignore user specified tags. Refs #1407

Typogrify interferes with certain sections of the output that it should not touch (see #1407 for more details).
This feature adds a setting called TYPOGRIFY_IGNORE_LIST which is a list of tag for Typogrify to ignore.

The following was updated:

 1. readers.py - if TYPOGRIFY_IGNORE_TAGS is present, then use it
 2. settings.ps - default TYPOGRIFY_IGNORE_TAGS to []
 3. contents/article_with_code_block.rst - an article with a code block for typogrify to ignore
 4. updated tests
 5. updated documentation
This commit is contained in:
Barry Steyn 2014-07-19 15:07:44 -07:00
commit a0ecab901f
6 changed files with 79 additions and 3 deletions

View file

@ -147,6 +147,9 @@ Setting name (followed by default value, if any)
incorporated into the generated HTML via the `Typogrify
<https://pypi.python.org/pypi/typogrify>`_ library,
which can be installed via: ``pip install typogrify``
``TYPOGRIFY_IGNORE_TAGS = []`` A list of tags for Typogrify to ignore. By default
Typogrify will ignore ``pre`` and ``code`` tags. This
requires that Typogrify version 2.0.4 or later is installed
``DIRECT_TEMPLATES =`` ``('index', 'categories', 'authors', 'archives')`` List of templates that are used directly to render
content. Typically direct templates are used to generate
index pages for collections of content (e.g., tags and