Skip to content

Commit

Permalink
Python 2.7 has to die
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Dec 28, 2015
1 parent e2b09e9 commit 5ecacd5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nikola/shortcodes.py
Expand Up @@ -254,10 +254,10 @@ def apply_shortcodes(data, registry, site=None, filename=None):
The site parameter is passed with the same name to the shortcodes so they can access Nikola state.
>>> apply_shortcodes('==> {{% foo bar=baz %}} <==', {'foo': lambda *a, **k: k['bar']})
'==> baz <=='
>>> apply_shortcodes('==> {{% foo bar=baz %}}some data{{% /foo %}} <==', {'foo': lambda *a, **k: k['bar']+k['data']})
'==> bazsome data <=='
>>> print(apply_shortcodes('==> {{% foo bar=baz %}} <==', {'foo': lambda *a, **k: k['bar']}))
==> baz <==
>>> print(apply_shortcodes('==> {{% foo bar=baz %}}some data{{% /foo %}} <==', {'foo': lambda *a, **k: k['bar']+k['data']}))
==> bazsome data <==
"""
empty_string = data[:0] # same string type as data; to make Python 2 happy
try:
Expand Down

0 comments on commit 5ecacd5

Please sign in to comment.