Skip to content

Commit

Permalink
Making sure the resulting string type is unicode, to make Python 2 ha…
Browse files Browse the repository at this point in the history
…ppy.
  • Loading branch information
felixfontein committed Dec 28, 2015
1 parent 43f9ace commit e19120a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nikola/shortcodes.py
Expand Up @@ -284,7 +284,7 @@ def apply_shortcodes(data, registry, site=None):
data_arg = []
for p in range(pos + 1, found):
data_arg.append(sc_data[p][1])
data_arg = ''.join(data_arg)
data_arg = u''.join(data_arg)
pos = found + 1
else:
# Single shortcode
Expand All @@ -299,7 +299,7 @@ def apply_shortcodes(data, registry, site=None):
LOGGER.error('Unknown shortcode {0} (started at {1})', name, _format_position(data, current[2]))
res = ''
result.append(res)
return ''.join(result)
return u''.join(result)
except ParsingError as e:
LOGGER.error("{0}".format(e))
sys.exit(1)

0 comments on commit e19120a

Please sign in to comment.