Skip to content

Commit

Permalink
Добавил правило замены №№ на №
Browse files Browse the repository at this point in the history
  • Loading branch information
hcodes committed Dec 26, 2016
1 parent c8da761 commit 0721fe0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/groups.json
Expand Up @@ -65,8 +65,8 @@
{
"name": "symbols",
"title": {
"en": "Symbols",
"ru": "Символы"
"en": "Symbols and signs",
"ru": "Символы и знаки"
}
},
{
Expand Down
6 changes: 6 additions & 0 deletions src/rules/ru/symbols/NN.js
@@ -0,0 +1,6 @@
Typograf.rule({
name: 'ru/symbols/NN',
handler: function(text) {
return text.replace(/№№/g, '№');
}
});
3 changes: 3 additions & 0 deletions src/rules/ru/symbols/NN.json
@@ -0,0 +1,3 @@
{
"common": "№№ → №"
}
4 changes: 4 additions & 0 deletions src/rules/ru/symbols/NN.spec.js
@@ -0,0 +1,4 @@
tests.push(['ru/symbols/NN', [
['№№ 5—10', '№ 5—10'],
['№№ 5—10\n№№ 8—12', '№ 5—10\n№ 8—12']
]]);

0 comments on commit 0721fe0

Please sign in to comment.