Skip to content
Myr

Improved changelog rendering

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 604b846 · Browse files · 2 files+2 added−17 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−17 removed

  • other:+2 added−17 removed

2 files+2 added−17 removed

modified:docs/changelog.rst+2 added-3 removed
1Changelog2=========1.. module:: jinja224.. jinjachangelog::3.. include:: ../CHANGES
modified:docs/jinjaext.py-14 removed
137 unmodified lines
138 return node.children139 return directive140141142def jinja_changelog(dirname, arguments, options, content, lineno,143 content_offset, block_text, state, state_machine):144 doc = ViewList()145 changelog = file(os.path.join(os.path.dirname(jinja2.__file__), '..',146 'CHANGES'))147 try:148 for line in islice(changelog, 3, None):149 doc.append(line.rstrip().decode('utf-8'), '<jinjaext>')150 finally:151 changelog.close()152 return parse_rst(state, content_offset, doc)153154142from jinja2.defaults import DEFAULT_FILTERS, DEFAULT_TESTS143jinja_filters = dump_functions(DEFAULT_FILTERS)144jinja_tests = dump_functions(DEFAULT_TESTS)145
50 unmodified lines
196197def setup(app):198 app.add_directive('jinjafilters', jinja_filters, 0, (0, 0, 0))199 app.add_directive('jinjatests', jinja_tests, 0, (0, 0, 0))213 app.add_directive('jinjachangelog', jinja_changelog, 0, (0, 0, 0))200 app.add_directive('jinjanodes', jinja_nodes, 0, (0, 0, 0))201 # uncomment for inline toc. links are broken unfortunately202 ##app.connect('doctree-resolved', inject_toc)