Skip to content

Commit cf91400

Browse files
sideshowbarkerdomenic
authored andcommitted
Make entities generator run under Python 3
Fixes #220
1 parent 3593258 commit cf91400

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

entities/entity-processor-json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ def codePointToString(codePoint):
4545
else:
4646
codes = str(int(value[1:], 16))
4747
glyphs = codePointToString(int(value[1:], 16))
48-
print ' "&' + name + ';": { "codepoints": [' + codes + '], "characters": "' + glyphs + '" },'
48+
print(' "&' + name + ';": { "codepoints": [' + codes + '], "characters": "' + glyphs + '" },')

entities/entity-processor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
value1 = value[1:6];
3030
value2 = value[7:];
3131
glyph = '<span data-x="" class="glyph compound">&#x' + value1 + ';&#x' + value2 + ';</span>'
32-
print ' <tr id="entity-' + name + '"> <td> <code data-x="">' + name + ';</code> </td> <td> U+' + value1 + ' U+' + value2 + ' </td> <td> ' + glyph + ' </td> </tr>';
32+
print(' <tr id="entity-' + name + '"> <td> <code data-x="">' + name + ';</code> </td> <td> U+' + value1 + ' U+' + value2 + ' </td> <td> ' + glyph + ' </td> </tr>');
3333
else:
3434
if (value[1:] in ['020DC', '00311', '020DB', '020DB']):
3535
glyph = '<span data-x="" class="glyph composition">&#x025CC;' + '&#x' + value[1:] + ';</span>'
3636
elif ('00000' < value[1:] < '00020'):
3737
glyph = '<span data-x="" class="glyph control">&#x024' + value[4:] + ';</span>'
3838
else:
3939
glyph = '<span data-x="" class="glyph">&#x' + value[1:] + ';</span>'
40-
print ' <tr id="entity-' + name + '"> <td> <code data-x="">' + name + ';</code> </td> <td> U+' + value[1:] + ' </td> <td> ' + glyph + ' </td> </tr>';
40+
print(' <tr id="entity-' + name + '"> <td> <code data-x="">' + name + ';</code> </td> <td> U+' + value[1:] + ' </td> <td> ' + glyph + ' </td> </tr>');

0 commit comments

Comments
 (0)