Skip to content

Commit

Permalink
Fix early return in charAllowsVerticalWritingMode
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Wojciechowski committed Nov 1, 2016
1 parent 85abbdc commit 97ef972
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/util/script_detection.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ module.exports.charAllowsIdeographicBreaking = function(char) {
};

function charAllowsVerticalWritingMode(char) {
// Return early for characters outside all ideographic ranges.
if (char < 0x2E80) return false;
// Return early for characters outside all ranges that allow the vertical
// writing mode.
if (char < 0x1100) return false;

if (isChar['Bopomofo Extended'](char)) return true;
if (isChar['Bopomofo'](char)) return true;
Expand Down

0 comments on commit 97ef972

Please sign in to comment.