src/emitter.js
function strongDirFromContent (text) {
  var m = text.match(strongDirRegExp)
  if (!m) {
    return null
  }
  if (m[2] === undefined) {
    return 'ltr'
  }
  return 'rtl'
}
function strongDirFromContent (text) {
  var m = text.match(strongDirRegExp)
  if (!m) {
    return null
  }
  if (m[2] === undefined) {
    return 'ltr'
  }
  return 'rtl'
}
function strongDirFromContent ( text ) { var m = text . match ( strongDirRegExp ) if ( ! m ) { return null } if ( m [ 2 ] === undefined ) { return 'ltr' } return 'rtl' }
Gets directionality of the first strongly directional codepoint

This is the rule the BIDI algorithm uses to determine the directionality of
paragraphs ( http://unicode.org/reports/tr9/#The_Paragraph_Level ) and
FSI isolates ( http://unicode.org/reports/tr9/#Explicit_Directional_Isolates ).

TODO: Does not handle BIDI control characters inside the text.
TODO: Does not handle unallocated characters.

@param {string} text The text from which to extract initial directionality.
@return {string} Directionality (either 'ltr' or 'rtl')
Gets directionality of the first strongly directional codepoint