##// END OF EJS Templates
upgrading >v4 header cells to unicode...
Nicholas Bollweg (Nick) -
Show More
@@ -91,7 +91,7 b' def upgrade_cell(cell):'
91 91 elif cell.cell_type == 'heading':
92 92 cell.cell_type = 'markdown'
93 93 level = cell.pop('level', 1)
94 cell.source = '{hashes} {single_line}'.format(
94 cell.source = u'{hashes} {single_line}'.format(
95 95 hashes='#' * level,
96 96 single_line = ' '.join(cell.get('source', '').splitlines()),
97 97 )
@@ -1,3 +1,4 b''
1 # -*- coding: utf-8 -*-
1 2 import copy
2 3
3 4 import nose.tools as nt
@@ -33,6 +34,10 b' def test_upgrade_heading():'
33 34 v3h(source='foo\nbar\nmulti-line\n', level=4),
34 35 v4m(source='#### foo bar multi-line'),
35 36 ),
37 (
38 v3h(source='unicode–conversion', level=4),
39 v4m(source=u'#### unicode–conversion'),
40 ),
36 41 ]:
37 42 upgraded = convert.upgrade_cell(v3cell)
38 43 nt.assert_equal(upgraded, expected)
General Comments 0
You need to be logged in to leave comments. Login now