Skip to content

Commit

Permalink
🔧
Browse files Browse the repository at this point in the history
  • Loading branch information
geminorum committed Jan 26, 2019
1 parent ead284c commit 7d98a7e
Show file tree
Hide file tree
Showing 5 changed files with 316 additions and 186 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.temp

/components
/bower_components
/node_modules

npm-debug.log
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ _all options are **enabled** by default._


* `cleanup_zwnj`
- remove more than one zwnj chars
- remove unnecessary zwnj chars that are succeeded/preceded by a space
- clean zwnj chars after Persian characters that don't conncet to the next letter
- clean zwnj chars before English characters
- clean zwnj chars after and before punctuation
- remove more than one zwnj chars
- remove unnecessary zwnj chars that are succeeded/preceded by a space
- clean zwnj chars after Persian characters that don't conncet to the next letter
- clean zwnj chars before English characters
- clean zwnj chars after and before punctuation


* `fix_arabic_numbers`
Expand Down
2 changes: 2 additions & 0 deletions lib/virastar.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,13 @@
text = text.replace(/(!){2,}/g, '$1');
text = text.replace(/(\u061F){2,}/g, '$1'); // \u061F = ؟
}

// replace kashidas to ndash in parenthetic
if (opts.kashidas_as_parenthetic) {
text = text.replace(/(\s)\u0640+/g, '$1–');
text = text.replace(/\u0640+(\s)/g, '–$1');
}

// should remove all kashida between non-whitespace characters
if (opts.cleanup_kashidas) {
text = text.replace(/(\S)\u0640+(\S)/g, '$1$2');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"devDependencies": {
"mocha": "^5.2.0",
"semistandard": "^13.0.1",
"stylelint": "^9.9.0"
"stylelint": "^9.10.1"
},
"semistandard": {
"ignore": [
Expand Down
Loading

0 comments on commit 7d98a7e

Please sign in to comment.