Skip to content

Commit

Permalink
Organize breakable array
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Wojciechowski committed Oct 19, 2016
1 parent d5f03c5 commit c1e0dac
Showing 1 changed file with 35 additions and 29 deletions.
64 changes: 35 additions & 29 deletions js/symbol/shaping.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,36 +63,42 @@ var invisible = {
};

var breakable = {
0x20: true, // space
0x0028: true, // dollar sign
0x24: true,
0xA3: true, // english pound sign
0xA5: true, // rmb sign
0xB7: true, // dot
0x2018: true, // left single quotation
0x22: true, // quotation mark
0x3002: true,
65374: true,
0x0020: true, // space
0x0022: true, // quotation mark
0x0024: true, // dollar sign
0x0026: true, // ampersand
0x0028: true, // left parenthesis
0x002b: true, // plus sign
0x002d: true, // hyphen-minus
0x002f: true, // solidus
0x00a3: true, // pound sign
0x00a5: true, // yen sign
0x00ad: true, // soft hyphen
0x00b7: true, // middle dot
0x200b: true, // zero-width space
0x2010: true, // hyphen
0x2013: true, // en dash
0x2018: true, // left single quotation mark
0x3002: true, // ideographic full stop
0x3008: true, // left angle bracket
0x300A: true, // left angle double bracket
0x300C: true, // left corner bracket
0x300E: true,
0x3010: true,
0x3014: true,
0x3016:true,
0x301D: true,
0xFE59: true,
0xFE5B: true,
0xFF04:true,
0xFF08: true,
0xFF0E: true,
0xFF3B: true,
0xFF5B: true,
0xFFE1: true,
0xFFE5: true,
0x200b: true,
0x533A: true
// zero-width space
0x300a: true, // left double angle bracket
0x300c: true, // left corner bracket
0x300e: true, // left white corner bracket
0x3010: true, // left black lenticular bracket
0x3014: true, // left tortoise shell bracket
0x3016: true, // left white lenticular bracket
0x301d: true, // reversed double prime quotation mark
0x533a: true, // unknown
0xfe59: true, // small left parenthesis
0xfe5b: true, // small left curly bracket
0xff04: true, // fullwidth dollar sign
0xff08: true, // fullwidth left parenthesis
0xff0e: true, // fullwidth full stop
0xff3b: true, // fullwidth left square bracket
0xff5b: true, // fullwidth left curly bracket
0xff5e: true, // fullwidth tilde
0xffe1: true, // fullwidth pound sign
0xffe5: true // fullwidth yen sign
};

invisible[newLine] = breakable[newLine] = true;
Expand Down

0 comments on commit c1e0dac

Please sign in to comment.