diff --git a/README.rst b/README.rst index f0574ae..89045a5 100644 --- a/README.rst +++ b/README.rst @@ -107,14 +107,16 @@ Any PyFS dependencies (Example: `boto` for S3 publishing) need to be installed seprately as well. :: - pip install fs - pip install boto + + pip install fs + pip install boto To get additional help on PyFS backends, you can run the following command once PyFS is installed: :: - fsls --listopeners + + fsls --listopeners Examples -------- diff --git a/hyde/tests/test_jinja2template.py b/hyde/tests/test_jinja2template.py index 40c39bc..efdb0bb 100644 --- a/hyde/tests/test_jinja2template.py +++ b/hyde/tests/test_jinja2template.py @@ -209,6 +209,39 @@ def test_markdown_with_extensions(): html = t.render(source, {}).strip() assert html == u'

Heading 3

' +def test_markdown_with_sourcecode(): + source = """ +{%markdown%} +# Code + + :::python + def add(a, b): + return a + b + +See [Example][] +[Example]: example.html + +{%endmarkdown%} +""" + + expected = """ +

Code

+
def add(a, b):
+    return a + b
+
+ + +

See Example

+ """ + t = Jinja2Template(JINJA2.path) + s = Site(JINJA2.path) + c = Config(JINJA2.path, config_dict=dict( + markdown=dict(extensions=['codehilite']))) + s.config = c + t.configure(s) + html = t.render(source, {}).strip() + assert html.strip() == expected.strip() + def test_line_statements(): source = """ @@ -713,6 +746,5 @@ item_list: t = Jinja2Template(JINJA2.path) t.configure(None) html = t.render(text, {}).strip() - print html assert html.strip() == expected.strip()