We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4891f5d commit 9b7f910Copy full SHA for 9b7f910
packages/ia-topnav/README.md
@@ -4,6 +4,7 @@
4
https://git.archive.org/www/offshoot/-/blob/main/guides/update-top-nav.md
5
## Installation
6
7
+## Add to your project
8
```bash
9
yarn add @internetarchive/ia-topnav
10
```
packages/ia-topnav/src/primary-nav.js
@@ -80,6 +80,7 @@ class PrimaryNav extends TrackedElement {
80
}
81
82
get isRTL() {
83
+ // https://stackoverflow.com/questions/12006095/javascript-how-to-check-if-character-is-rtl
84
const ltrChars = 'A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u0300-\u0590\u0800-\u1FFF'+'\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF';
85
const rtlChars = '\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC';
86
const rtlCheck = new RegExp('^[^'+ltrChars+']*['+rtlChars+']');
0 commit comments