Comparing version 4.1.0 to 4.2.0
# Changelog | ||
# v4.2.0 | ||
Новые правила: | ||
- Замена обычного пробела на неразрывный узкий в группах чисел `ru/nbsp/groupNumbers` | ||
- Неразрывный пробел перед «руб.» и «коп.» `ru/nbsp/rubleKopek` | ||
- Неразрывный пробел перед знаками валют `ru/money/currency` | ||
Добавлена возможность указывать блоки текста, где не нужно типографировать: | ||
```js | ||
var t = new Typograf({lang: 'ru'}); | ||
t.addSafeTag('<mytag>', '</mytag>'); | ||
t.addSafeTag('<mytag>', '</mytag>', '.*?'); | ||
t.addSafeTag(/<mytag>.*?</mytag>/gi); | ||
``` | ||
# v4.1.0 | ||
@@ -4,0 +18,0 @@ Доработки правил: |
@@ -214,5 +214,3 @@ /*! Typograf | © 2015 Denis Seleznev | https://github.com/typograf/typograf/ */ | ||
if(this._isHTML) { | ||
text = this._hideSafeTags(text); | ||
} | ||
text = this._hideSafeTags(text); | ||
@@ -227,5 +225,3 @@ text = this._utfication(text); | ||
if(this._isHTML) { | ||
text = this._showSafeTags(text); | ||
} | ||
text = this._showSafeTags(text); | ||
@@ -296,7 +292,19 @@ executeRulesForQueue('end'); | ||
* | ||
* @param {string} startTag | ||
* @param {string} endTag | ||
*/ | ||
addSafeTag: function(startTag, endTag) { | ||
this._safeTags.push([startTag, endTag]); | ||
* @example | ||
* // var t = new Typograf({lang: 'ru'}); | ||
* // t.addSafeTag('<mytag>', '</mytag>'); | ||
* // t.addSafeTag('<mytag>', '</mytag>', '.*?'); | ||
* // t.addSafeTag(/<mytag>.*?</mytag>/gi); | ||
* | ||
* @param {string|RegExp} startTag | ||
* @param {string} [endTag] | ||
* @param {string} [middle] | ||
* @return {Typograf} this | ||
*/ | ||
addSafeTag: function(startTag, endTag, middle) { | ||
var tag = startTag instanceof RegExp ? startTag : [startTag, endTag, middle]; | ||
this._safeTags.own.push(this._prepareSafeTag(tag)); | ||
return this; | ||
}, | ||
@@ -446,3 +454,3 @@ _data: function(key) { | ||
_initSafeTags: function() { | ||
this._safeTags = [ | ||
var html = [ | ||
['<!--', '-->'], | ||
@@ -465,17 +473,45 @@ ['<!ENTITY', '>'], | ||
].forEach(function(tag) { | ||
this._safeTags.push(['<' + tag + '(\\s[^>]*?)?>', '</' + tag + '>']); | ||
html.push([ | ||
'<' + tag + '(\\s[^>]*?)?>', | ||
'</' + tag + '>' | ||
]); | ||
}, this); | ||
this._safeTags = { | ||
html: html.map(this._prepareSafeTag), | ||
own: [] | ||
}; | ||
}, | ||
_hideSafeTags: function(text) { | ||
var iterator = function(tag) { | ||
text = text.replace(this._prepareSafeTag(tag), this._pasteLabel); | ||
}; | ||
this._hiddenSafeTags = {}; | ||
this._iLabel = 0; | ||
this._safeTags.forEach(function(tag) { | ||
var re = new RegExp(tag[0] + '[^]*?' + tag[1], 'gi'); | ||
text = text.replace(re, this._pasteLabel); | ||
}, this); | ||
this._safeTags.own.forEach(iterator, this); | ||
return this._hideHTMLTags(text); | ||
if(this._isHTML) { | ||
this._safeTags.html.forEach(iterator, this); | ||
text = this._hideHTMLTags(text); | ||
} | ||
return text; | ||
}, | ||
_prepareSafeTag: function(tag) { | ||
var re; | ||
if(tag instanceof RegExp) { | ||
re = tag; | ||
} else { | ||
var startTag = tag[0], | ||
endTag = tag[1], | ||
middle = typeof tag[2] === 'undefined' ? '[^]*?' : tag[2]; | ||
re = new RegExp(startTag + middle + endTag, 'gi'); | ||
} | ||
return re; | ||
}, | ||
_getPrivateLabel: function(i) { | ||
@@ -504,4 +540,10 @@ var label = Typograf._privateLabel; | ||
reReplace = new RegExp(label + 'tf\\d+' + label, 'g'), | ||
reSearch = new RegExp(label + 'tf\\d'); | ||
for(var i = 0; i < this._safeTags.length; i++) { | ||
reSearch = new RegExp(label + 'tf\\d'), | ||
len = 0; | ||
Object.keys(this._safeTags).forEach(function(tags) { | ||
len += tags.length; | ||
}); | ||
for(var i = 0; i < len; i++) { | ||
text = text.replace(reReplace, this._replaceLabel); | ||
@@ -513,3 +555,3 @@ if(text.search(reSearch) === -1) { | ||
delete this._hiddenSafeTags; | ||
this._hiddenSafeTags = {}; | ||
@@ -554,3 +596,3 @@ return text; | ||
Typograf.version = '4.1.0'; | ||
Typograf.version = '4.2.0'; | ||
@@ -875,88 +917,2 @@ Typograf.groupIndexes = { | ||
Typograf.rule({ | ||
name: 'common/nbsp/afterNumber', | ||
handler: function(text) { | ||
var re = '(^|\\D)(\\d{1,5}) ([' + | ||
this._data('l') + | ||
']{2,})'; | ||
return text.replace(new RegExp(re, 'gi'), '$1$2\u00A0$3'); | ||
}, | ||
disabled: true | ||
}); | ||
Typograf.rule({ | ||
name: 'common/nbsp/afterParagraph', | ||
handler: function(text) { | ||
// \u2009 - THIN SPACE | ||
// \u202F - NARROW NO-BREAK SPACE | ||
return text.replace(/\u00A7[ \u00A0\u2009]?(\d|I|V|X)/g, '\u00A7\u202F$1'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'common/nbsp/afterShortWord', | ||
handler: function(text, settings) { | ||
var len = settings.lengthShortWord, | ||
before = ' \u00A0(' + Typograf._privateLabel + Typograf.data('common/quote'), | ||
subStr = '(^|[' + before + '])([' + this._data('l') + ']{1,' + len + '}) ', | ||
newSubStr = '$1$2\u00A0', | ||
re = new RegExp(subStr, 'gim'); | ||
return text | ||
.replace(re, newSubStr) | ||
.replace(re, newSubStr); | ||
}, | ||
settings: { | ||
lengthShortWord: 2 | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'common/nbsp/beforeShortLastWord', | ||
handler: function(text, settings) { | ||
var re = new RegExp('([' + this._data('l') + '\d]) ([' + | ||
this._data('lL') + ']{1,' + settings.lengthLastWord + | ||
'}[.!?…])( [' + this._data('L') + ']|$)', 'g'); | ||
return text.replace(re, '$1\u00A0$2$3'); | ||
}, | ||
settings: { | ||
lengthLastWord: 3 | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'common/nbsp/dpi', | ||
handler: function(text) { | ||
return text.replace(/(\d) ?(lpi|dpi)(?!\w)/, '$1\u00A0$2'); | ||
} | ||
}); | ||
(function() { | ||
function replaceNbsp($0, $1, $2, $3) { | ||
return $1 + $2.replace(/([^\u00A0])\u00A0([^\u00A0])/g, '$1 $2') + $3; | ||
} | ||
Typograf.rule({ | ||
name: 'common/nbsp/nowrap', | ||
queue: 'end', | ||
handler: function(text) { | ||
return text | ||
.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g, replaceNbsp) | ||
.replace(/(<nobr>)(.*?)(<\/nobr>)/g, replaceNbsp); | ||
} | ||
}); | ||
})(); | ||
Typograf.rule({ | ||
name: 'common/nbsp/replaceNbsp', | ||
queue: 'utf', | ||
live: true, | ||
handler: function(text) { | ||
return text.replace(/\u00A0/g, ' '); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'common/html/e-mail', | ||
@@ -1066,2 +1022,88 @@ handler: function(text) { | ||
Typograf.rule({ | ||
name: 'common/nbsp/afterNumber', | ||
handler: function(text) { | ||
var re = '(^|\\D)(\\d{1,5}) ([' + | ||
this._data('l') + | ||
']{2,})'; | ||
return text.replace(new RegExp(re, 'gi'), '$1$2\u00A0$3'); | ||
}, | ||
disabled: true | ||
}); | ||
Typograf.rule({ | ||
name: 'common/nbsp/afterParagraph', | ||
handler: function(text) { | ||
// \u2009 - THIN SPACE | ||
// \u202F - NARROW NO-BREAK SPACE | ||
return text.replace(/\u00A7[ \u00A0\u2009]?(\d|I|V|X)/g, '\u00A7\u202F$1'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'common/nbsp/afterShortWord', | ||
handler: function(text, settings) { | ||
var len = settings.lengthShortWord, | ||
before = ' \u00A0(' + Typograf._privateLabel + Typograf.data('common/quote'), | ||
subStr = '(^|[' + before + '])([' + this._data('l') + ']{1,' + len + '}) ', | ||
newSubStr = '$1$2\u00A0', | ||
re = new RegExp(subStr, 'gim'); | ||
return text | ||
.replace(re, newSubStr) | ||
.replace(re, newSubStr); | ||
}, | ||
settings: { | ||
lengthShortWord: 2 | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'common/nbsp/beforeShortLastWord', | ||
handler: function(text, settings) { | ||
var re = new RegExp('([' + this._data('l') + '\d]) ([' + | ||
this._data('lL') + ']{1,' + settings.lengthLastWord + | ||
'}[.!?…])( [' + this._data('L') + ']|$)', 'g'); | ||
return text.replace(re, '$1\u00A0$2$3'); | ||
}, | ||
settings: { | ||
lengthLastWord: 3 | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'common/nbsp/dpi', | ||
handler: function(text) { | ||
return text.replace(/(\d) ?(lpi|dpi)(?!\w)/, '$1\u00A0$2'); | ||
} | ||
}); | ||
(function() { | ||
function replaceNbsp($0, $1, $2, $3) { | ||
return $1 + $2.replace(/([^\u00A0])\u00A0([^\u00A0])/g, '$1 $2') + $3; | ||
} | ||
Typograf.rule({ | ||
name: 'common/nbsp/nowrap', | ||
queue: 'end', | ||
handler: function(text) { | ||
return text | ||
.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g, replaceNbsp) | ||
.replace(/(<nobr>)(.*?)(<\/nobr>)/g, replaceNbsp); | ||
} | ||
}); | ||
})(); | ||
Typograf.rule({ | ||
name: 'common/nbsp/replaceNbsp', | ||
queue: 'utf', | ||
live: true, | ||
handler: function(text) { | ||
return text.replace(/\u00A0/g, ' '); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'common/number/fraction', | ||
@@ -1094,3 +1136,3 @@ handler: function(text) { | ||
handler: function(text) { | ||
return text.replace(/(\d)[ \u00A0]?(x|х)[ \u00A0]?(\d)/g, '$1×$3'); | ||
return text.replace(/(\d)[ \u00A0]?[xх][ \u00A0]?(\d)/g, '$1×$2'); | ||
} | ||
@@ -1519,11 +1561,13 @@ }); | ||
Typograf.rule({ | ||
name: 'ru/money/dollar', | ||
name: 'ru/money/currency', | ||
handler: function(text) { | ||
var re1 = new RegExp('(^|[\\D]{2,})\\$ ?([\\d.,]+([ \u00A0\u2009\u202F]\\d{3})*)', 'g'), | ||
re2 = new RegExp('(^|[\\D])([\\d.,]+) ?\\$', 'g'), | ||
rep = '$1$2\u00A0$'; | ||
var currency = '([$€¥Ұ£₤₽])', | ||
re1 = new RegExp('(^|[\\D]{2,})' + currency + ' ?([\\d.,]+([ \u00A0\u2009\u202F]\\d{3})*)', 'g'), | ||
re2 = new RegExp('(^|[\\D])([\\d.,]+) ?' + currency, 'g'), | ||
newSubstr1 = '$1$3\u00A0$2', | ||
newSubstr2 = '$1$2\u00A0$3'; | ||
return text | ||
.replace(re1, rep) | ||
.replace(re2, rep); | ||
.replace(re1, newSubstr1) | ||
.replace(re2, newSubstr2); | ||
} | ||
@@ -1533,22 +1577,14 @@ }); | ||
Typograf.rule({ | ||
name: 'ru/money/euro', | ||
handler: function(text) { | ||
var re1 = new RegExp('(^|[\\D]{2,})€ ?([\\d.,]+([ \u00A0\u2009\u202F]\\d{3})*)', 'g'), | ||
re2 = new RegExp('(^|[\\D])([\\d.,]+) ?€', 'g'), | ||
rep = '$1$2\u00A0€'; | ||
return text | ||
.replace(re1, rep) | ||
.replace(re2, rep); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/money/ruble', | ||
handler: function(text) { | ||
var rep = '$1\u00A0₽'; | ||
var newSubstr = '$1\u00A0₽', | ||
commonPart = '(\\d+)( |\u00A0)?(р|руб)\\.', | ||
re1 = new RegExp('^' + commonPart + '$', 'g'), | ||
re2 = new RegExp(commonPart + '(?=[!?,:;])', 'g'), | ||
re3 = new RegExp(commonPart + '(?=\\s+[A-ЯЁ])', 'g'); | ||
return text | ||
.replace(/^(\d+)( |\u00A0)?(р|руб)\.$/, rep) | ||
.replace(/(\d+)( |\u00A0)?(р|руб)\.(?=[!?,:;])/g, rep) | ||
.replace(/(\d+)( |\u00A0)?(р|руб)\.(?=\s+[A-ЯЁ])/g, rep + '.'); | ||
.replace(re1, newSubstr) | ||
.replace(re2, newSubstr) | ||
.replace(re3, newSubstr + '.'); | ||
}, | ||
@@ -1641,2 +1677,11 @@ disabled: true | ||
Typograf.rule({ | ||
name: 'ru/nbsp/groupNumbers', | ||
handler: function(text) { | ||
return text.replace(/(^ ?|\D )(\d{1,3}([ \u00A0\u202F\u2009]\d{3})+)(?! ?[\d-])/gm, function($0, $1, $2) { | ||
return $1 + $2.replace(/\s/g, '\u202F'); | ||
}); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/nbsp/m', | ||
@@ -1692,2 +1737,9 @@ index: '+5', | ||
Typograf.rule({ | ||
name: 'ru/nbsp/rubleKopek', | ||
handler: function(text) { | ||
return text.replace(/(\d) ?(?=(руб|коп)\.)/g, '$1\u00A0'); | ||
} | ||
}); | ||
/*jshint maxlen:1000 */ | ||
@@ -1694,0 +1746,0 @@ Typograf.rule({ |
/*! Typograf | © 2015 Denis Seleznev | https://github.com/typograf/typograf/ */ | ||
!function(e,n){"function"==typeof define&&define.amd?define("typograf",[],n):"object"==typeof exports?module.exports=n():e.Typograf=n()}(this,function(){"use strict";function e(e){this._prefs="object"==typeof e?e:{},this._prefs.live=this._prefs.live||!1,this._settings={},this._enabledRules={},this._replaceLabel=this._replaceLabel.bind(this),this._pasteLabel=this._pasteLabel.bind(this),this._initSafeTags(),this._rules.forEach(this._prepareRule,this),this._prefs.disable&&this.disable(this._prefs.disable),this._prefs.enable&&this.enable(this._prefs.enable)}return e.rule=function(n){var r=n.name.split("/");return n._enabled=n.disabled===!0?!1:!0,n._lang=r[0],n._group=r[1],n._name=r[2],e._setIndex(n),"common"!==n._lang&&-1!==e._langs.indexOf(n._lang)&&e._langs.push(n._lang),e.prototype._rules.push(n),e._needSortRules&&this._sortRules(),this},e._setIndex=function(n){var r=n.index,a=typeof r,t=e.groupIndexes[n._group];"undefined"===a?r=t:"string"===a&&(r=t+parseInt(n.index,10)),n._index=r},e.innerRule=function(n){return e.prototype._innerRules.push(n),n._lang=n.name.split("/")[0],this},e.data=function(n,r){if("string"==typeof n){if(1===arguments.length)return e._data[n];e._data[n]=r}else"object"==typeof n&&Object.keys(n).forEach(function(r){e._data[r]=n[r]})},e._data={},e._sortRules=function(){e.prototype._rules.sort(function(e,n){return e._index>n._index?1:-1})},e._replace=function(e,n){for(var r=0;r<n.length;r++)e=e.replace(n[r][0],n[r][1]);return e},e._langs=[],e._privateLabel="\udbff",e.prototype={constructor:e,execute:function(e,n){n=n||{};var r=this,a=n.lang||this._prefs.lang||"common",t={},u={},l="undefined"==typeof n.mode?this._prefs.mode:n.mode,i=function(n){var r=n._lang,t=this._prefs.live;t===!0&&n.live===!1||t===!1&&n.live===!0||"common"!==r&&r!==a||!this.enabled(n.name)||(this._onBeforeRule&&this._onBeforeRule(e),e=n.handler.call(this,e,this._settings[n.name]),this._onAfterRule&&this._onAfterRule(e))},s=function(e){u[e]&&u[e].forEach(i,r),t[e]&&t[e].forEach(i,r)};return this._lang=a,(e=""+e)?(e=this._fixLineEnd(e),this._innerRules.forEach(function(e){var n=e.queue;u[n]=u[n]||[],u[n].push(e)},this),this._rules.forEach(function(e){var n=e.queue;t[n]=t[n]||[],t[n].push(e)},this),this._isHTML=-1!==e.search(/(<\/?[a-z]|<!|&[lg]t;)/i),s("start"),this._isHTML&&(e=this._hideSafeTags(e)),e=this._utfication(e),s("utf"),s(),e=this._modification(e,l),s("entity"),this._isHTML&&(e=this._showSafeTags(e)),s("end"),this._lang=null,this._isHTML=null,e):""},setting:function(e,n,r){return arguments.length<=2?this._settings[e]&&this._settings[e][n]:(this._settings[e]=this._settings[e]||{},this._settings[e][n]=r,this)},enabled:function(e){return this._enabledRules[e]},disabled:function(e){return!this._enabledRules[e]},enable:function(e){return this._enable(e,!0)},disable:function(e){return this._enable(e,!1)},addSafeTag:function(e,n){this._safeTags.push([e,n])},_data:function(n){return e.data(this._lang+"/"+n)},_quote:function(n,r){var a=this._data("l")+"\u0301\\d",t=e._privateLabel,u=r.lquote,l=r.rquote,i=r.lquote2,s=r.rquote2,o="["+e.data("common/quote")+"]",c="["+a+")!?.:;#*,\u2026]*?",p=new RegExp('"(['+a+"])","gi"),d=new RegExp("("+c+')"('+c+")","gi"),h=new RegExp(o,"g"),g=new RegExp("^(\\s)?("+o+")","g"),m=new RegExp("(^|\\s)"+o+t,"g"),f=new RegExp(t+o+"([\\s!?.:;#*,]|$)","g"),$=0;return n=n.replace(h,function(){return $++,'"'}).replace(p,u+"$1").replace(d,"$1"+l+"$2").replace(m,"$1"+u+t).replace(f,t+l+"$1").replace(g,"$1"+u),i&&s&&$%2===0?this._innerQuote(n,r):n},_innerQuote:function(e,n){var r=[n.lquote],a=[n.rquote],t=n.lquote,u=n.rquote,l=new Array(e.length);n.lquote2&&n.rquote2&&(r.push(n.lquote2),a.push(n.rquote2),n.lquote3&&n.rquote3&&(r.push(n.lquote3),a.push(n.rquote3)));for(var i=-1,s=r.length-1,o=0,c=e.length;c>o;o++){var p=e[o];p===t?(i++,i>s&&(i=s),l.push(r[i])):p===u?-1>=i?(i=0,l.push(r[i])):(l.push(a[i]),i--,-1>i&&(i=-1)):l.push(p)}return l.join("")},_fixLineEnd:function(e){return e.replace(/\r\n/g,"\n")},_prepareRule:function(e){var n=e.name,r={};"object"==typeof e.settings&&Object.keys(e.settings).forEach(function(n){r[n]=e.settings[n]}),this._settings[n]=r,this._enabledRules[n]=e._enabled},_enable:function(e,n){return Array.isArray(e)?e.forEach(function(e){this._enableByMask(e,n)},this):this._enableByMask(e,n),this},_enableByMask:function(e,n){var r;-1!==e.search(/\*/)?(r=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*")),this._rules.forEach(function(e){var a=e.name;r.test(a)&&(this._enabledRules[a]=n)},this)):this._enabledRules[e]=n},_rules:[],_innerRules:[],_getRule:function(e){var n=null;return this._rules.some(function(r){return r.name===e?(n=r,!0):!1}),n},_initSafeTags:function(){this._safeTags=[["<!--","-->"],["<!ENTITY",">"],["<!DOCTYPE",">"],["<\\?xml","\\?>"],["<!\\[CDATA\\[","\\]\\]>"]],["code","kbd","object","pre","samp","script","style","var"].forEach(function(e){this._safeTags.push(["<"+e+"(\\s[^>]*?)?>","</"+e+">"])},this)},_hideSafeTags:function(e){return this._hiddenSafeTags={},this._iLabel=0,this._safeTags.forEach(function(n){var r=new RegExp(n[0]+"[^]*?"+n[1],"gi");e=e.replace(r,this._pasteLabel)},this),this._hideHTMLTags(e)},_getPrivateLabel:function(n){var r=e._privateLabel;return r+"tf"+n+r},_pasteLabel:function(e){var n=this._getPrivateLabel(this._iLabel);return this._hiddenSafeTags[n]=e,this._iLabel++,n},_replaceLabel:function(e){return this._hiddenSafeTags[e]},_hideHTMLTags:function(e){return e.replace(/<\/?[a-z][^]*?>/gi,this._pasteLabel).replace(/<\/?[a-z][^]*?>/gi,this._pasteLabel).replace(/&[gl]t;/gi,this._pasteLabel)},_showSafeTags:function(n){for(var r=e._privateLabel,a=new RegExp(r+"tf\\d+"+r,"g"),t=new RegExp(r+"tf\\d"),u=0;u<this._safeTags.length&&(n=n.replace(a,this._replaceLabel),-1!==n.search(t));u++);return delete this._hiddenSafeTags,n},_utfication:function(e){return-1!==e.search(/&#/)&&(e=this._decHexToUtf(e)),-1!==e.search(/&[a-z]/i)&&this.entities.forEach(function(n){e=e.replace(n[3],n[2])}),e.replace(/"/g,'"')},_decHexToUtf:function(e){return e.replace(/&#(\d{1,6});/gi,function(e,n){return String.fromCharCode(parseInt(n,10))}).replace(/&#x([\da-f]{1,6});/gi,function(e,n){return String.fromCharCode(parseInt(n,16))})},_modification:function(e,n){if("name"===n||"digit"===n){var r="name"===n?0:1;this.entities.forEach(function(n){n[r]&&(e=e.replace(n[4],n[r]))})}return e}},e.version="4.1.0",e.groupIndexes={symbols:110,space:210,dash:310,punctuation:410,nbsp:510,number:610,money:710,date:810,other:910,optalign:1010,html:1110},e.prototype.entities=[],[["nbsp",160],["iexcl",161],["cent",162],["pound",163],["curren",164],["yen",165],["brvbar",166],["sect",167],["uml",168],["copy",169],["ordf",170],["laquo",171],["not",172],["shy",173],["reg",174],["macr",175],["deg",176],["plusmn",177],["sup2",178],["sup3",179],["acute",180],["micro",181],["para",182],["middot",183],["cedil",184],["sup1",185],["ordm",186],["raquo",187],["frac14",188],["frac12",189],["frac34",190],["iquest",191],["Agrave",192],["Aacute",193],["Acirc",194],["Atilde",195],["Auml",196],["Aring",197],["AElig",198],["Ccedil",199],["Egrave",200],["Eacute",201],["Ecirc",202],["Euml",203],["Igrave",204],["Iacute",205],["Icirc",206],["Iuml",207],["ETH",208],["Ntilde",209],["Ograve",210],["Oacute",211],["Ocirc",212],["Otilde",213],["Ouml",214],["times",215],["Oslash",216],["Ugrave",217],["Uacute",218],["Ucirc",219],["Uuml",220],["Yacute",221],["THORN",222],["szlig",223],["agrave",224],["aacute",225],["acirc",226],["atilde",227],["auml",228],["aring",229],["aelig",230],["ccedil",231],["egrave",232],["eacute",233],["ecirc",234],["euml",235],["igrave",236],["iacute",237],["icirc",238],["iuml",239],["eth",240],["ntilde",241],["ograve",242],["oacute",243],["ocirc",244],["otilde",245],["ouml",246],["divide",247],["oslash",248],["ugrave",249],["uacute",250],["ucirc",251],["uuml",252],["yacute",253],["thorn",254],["yuml",255],["fnof",402],["Alpha",913],["Beta",914],["Gamma",915],["Delta",916],["Epsilon",917],["Zeta",918],["Eta",919],["Theta",920],["Iota",921],["Kappa",922],["Lambda",923],["Mu",924],["Nu",925],["Xi",926],["Omicron",927],["Pi",928],["Rho",929],["Sigma",931],["Tau",932],["Upsilon",933],["Phi",934],["Chi",935],["Psi",936],["Omega",937],["alpha",945],["beta",946],["gamma",947],["delta",948],["epsilon",949],["zeta",950],["eta",951],["theta",952],["iota",953],["kappa",954],["lambda",955],["mu",956],["nu",957],["xi",958],["omicron",959],["pi",960],["rho",961],["sigmaf",962],["sigma",963],["tau",964],["upsilon",965],["phi",966],["chi",967],["psi",968],["omega",969],["thetasym",977],["upsih",978],["piv",982],["bull",8226],["hellip",8230],["prime",8242],["Prime",8243],["oline",8254],["frasl",8260],["weierp",8472],["image",8465],["real",8476],["trade",8482],["alefsym",8501],["larr",8592],["uarr",8593],["rarr",8594],["darr",8595],["harr",8596],["crarr",8629],["lArr",8656],["uArr",8657],["rArr",8658],["dArr",8659],["hArr",8660],["forall",8704],["part",8706],["exist",8707],["empty",8709],["nabla",8711],["isin",8712],["notin",8713],["ni",8715],["prod",8719],["sum",8721],["minus",8722],["lowast",8727],["radic",8730],["prop",8733],["infin",8734],["ang",8736],["and",8743],["or",8744],["cap",8745],["cup",8746],["int",8747],["there4",8756],["sim",8764],["cong",8773],["asymp",8776],["ne",8800],["equiv",8801],["le",8804],["ge",8805],["sub",8834],["sup",8835],["nsub",8836],["sube",8838],["supe",8839],["oplus",8853],["otimes",8855],["perp",8869],["sdot",8901],["lceil",8968],["rceil",8969],["lfloor",8970],["rfloor",8971],["lang",9001],["rang",9002],["spades",9824],["clubs",9827],["hearts",9829],["diams",9830],["loz",9674],["OElig",338],["oelig",339],["Scaron",352],["scaron",353],["Yuml",376],["circ",710],["tilde",732],["ensp",8194],["emsp",8195],["thinsp",8201],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207],["ndash",8211],["mdash",8212],["lsquo",8216],["rsquo",8217],["sbquo",8218],["ldquo",8220],["rdquo",8221],["bdquo",8222],["dagger",8224],["Dagger",8225],["permil",8240],["lsaquo",8249],["rsaquo",8250],["euro",8364],["NestedGreaterGreater",8811],["NestedLessLess",8810]].forEach(function(n){var r=n[0],a=n[1],t=String.fromCharCode(a),u=["&"+r+";","&#"+a+";",t,new RegExp("&"+r+";","g"),new RegExp(t,"g")];e.prototype.entities.push(u)},this),e.data("common/dash","--?|\u2012|\u2013|\u2014"),e.data("common/quote",'\xab\u2039\xbb\u203a\u201e\u201a\u201c\u201f\u2018\u201b\u201d\u2019"'),e.data({"en/l":"a-z","en/L":"A-Z","en/lL":"a-zA-Z"}),e._langs.push("en"),e.data({"ru/dashBefore":"(^| |\\n)","ru/dashAfter":"([\xa0 ,.?:!]|$)"}),e.data({"ru/l":"\u0430-\u044f\u0451a-z","ru/L":"\u0410-\u042f\u0401A-Z","ru/lL":"\u0430-\u044f\u0451\u0410-\u042f\u0401a-zA-Z"}),e._langs.push("ru"),e.data({"ru/month":"\u044f\u043d\u0432\u0430\u0440\u044c|\u0444\u0435\u0432\u0440\u0430\u043b\u044c|\u043c\u0430\u0440\u0442|\u0430\u043f\u0440\u0435\u043b\u044c|\u043c\u0430\u0439|\u0438\u044e\u043d\u044c|\u0438\u044e\u043b\u044c|\u0430\u0432\u0433\u0443\u0441\u0442|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c|\u043e\u043a\u0442\u044f\u0431\u0440\u044c|\u043d\u043e\u044f\u0431\u0440\u044c|\u0434\u0435\u043a\u0430\u0431\u0440\u044c","ru/monthGenCase":"\u044f\u043d\u0432\u0430\u0440\u044f|\u0444\u0435\u0432\u0440\u0430\u043b\u044f|\u043c\u0430\u0440\u0442\u0430|\u0430\u043f\u0440\u0435\u043b\u044f|\u043c\u0430\u044f|\u0438\u044e\u043d\u044f|\u0438\u044e\u043b\u044f|\u0430\u0432\u0433\u0443\u0441\u0442\u0430|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f|\u043e\u043a\u0442\u044f\u0431\u0440\u044f|\u043d\u043e\u044f\u0431\u0440\u044f|\u0434\u0435\u043a\u0430\u0431\u0440\u044f","ru/monthPreCase":"\u044f\u043d\u0432\u0430\u0440\u0435|\u0444\u0435\u0432\u0440\u0430\u043b\u0435|\u043c\u0430\u0440\u0442\u0435|\u0430\u043f\u0440\u0435\u043b\u0435|\u043c\u0430\u0435|\u0438\u044e\u043d\u0435|\u0438\u044e\u043b\u0435|\u0430\u0432\u0433\u0443\u0441\u0442\u0435|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0435|\u043e\u043a\u0442\u044f\u0431\u0440\u0435|\u043d\u043e\u044f\u0431\u0440\u0435|\u0434\u0435\u043a\u0430\u0431\u0440\u0435","ru/shortMonth":"\u044f\u043d\u0432|\u0444\u0435\u0432|\u043c\u0430\u0440|\u0430\u043f\u0440|\u043c\u0430[\u0435\u0439\u044f]|\u0438\u044e\u043d|\u0438\u044e\u043b|\u0430\u0432\u0433|\u0441\u0435\u043d|\u043e\u043a\u0442|\u043d\u043e\u044f|\u0434\u0435\u043a"}),e.data("ru/weekday","\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a|\u0432\u0442\u043e\u0440\u043d\u0438\u043a|\u0441\u0440\u0435\u0434\u0430|\u0447\u0435\u0442\u0432\u0435\u0440\u0433|\u043f\u044f\u0442\u043d\u0438\u0446\u0430|\u0441\u0443\u0431\u0431\u043e\u0442\u0430|\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435"),e.rule({name:"common/html/e-mail",handler:function(e){return e.replace(/(^|[\s;(])([\w\-.]{2,})@([\w\-.]{2,})\.([a-z]{2,6})([)\s.,!?]|$)/gi,'$1<a href="mailto:$2@$3.$4">$2@$3.$4</a>$5')},disabled:!0}),e.rule({name:"common/html/escape",index:"+100",queue:"end",handler:function(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return e.replace(/[&<>"'\/]/g,function(e){return n[e]})},disabled:!0}),e.rule({name:"common/html/nbr",index:"+5",queue:"end",handler:function(e){return-1===e.search(/<br/)?e.replace(/\n/g,"<br/>\n"):e},disabled:!0}),e.rule({name:"common/html/pbr",queue:"end",handler:function(e){return-1===e.search(/<(p|br)[\s\/>]/)&&(-1===e.search(/\n/)?e="<p>"+e+"</p>":(e="<p>"+e.replace(/\n\n/g,"</p>\n<p>")+"</p>",e=e.replace(/([^>])\n/g,"$1<br/>\n"))),e},disabled:!0}),e.rule({name:"common/html/stripTags",index:"+99",queue:"end",handler:function(e){return e.replace(/<[^>]+>/g,"")},disabled:!0}),e.rule({name:"common/html/url",handler:function(e){var n="(http|https|ftp|telnet|news|gopher|file|wais)://",r="([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)",a=new RegExp(n+r,"g");return e.replace(a,function(e,n,r){r=r.replace(/([^\/]+\/?)(\?|#)$/,"$1").replace(/^([^\/]+)\/$/,"$1"),"http"===n?r=r.replace(/^([^\/]+)(:80)([^\d]|\/|$)/,"$1$3"):"https"===n&&(r=r.replace(/^([^\/]+)(:443)([^\d]|\/|$)/,"$1$3"));var a=r,t=n+"://"+r,u='<a href="'+t+'">';return"http"===n||"https"===n?(a=a.replace(/^www\./,""),u+("http"===n?a:n+"://"+a)+"</a>"):u+t+"</a>"})},disabled:!0}),e.rule({name:"common/nbsp/afterNumber",handler:function(e){var n="(^|\\D)(\\d{1,5}) (["+this._data("l")+"]{2,})";return e.replace(new RegExp(n,"gi"),"$1$2\xa0$3")},disabled:!0}),e.rule({name:"common/nbsp/afterParagraph",handler:function(e){return e.replace(/\u00A7[ \u00A0\u2009]?(\d|I|V|X)/g,"\xa7\u202f$1")}}),e.rule({name:"common/nbsp/afterShortWord",handler:function(n,r){var a=r.lengthShortWord,t=" \xa0("+e._privateLabel+e.data("common/quote"),u="(^|["+t+"])(["+this._data("l")+"]{1,"+a+"}) ",l="$1$2\xa0",i=new RegExp(u,"gim");return n.replace(i,l).replace(i,l)},settings:{lengthShortWord:2}}),e.rule({name:"common/nbsp/beforeShortLastWord",handler:function(e,n){var r=new RegExp("(["+this._data("l")+"d]) (["+this._data("lL")+"]{1,"+n.lengthLastWord+"}[.!?\u2026])( ["+this._data("L")+"]|$)","g");return e.replace(r,"$1\xa0$2$3")},settings:{lengthLastWord:3}}),e.rule({name:"common/nbsp/dpi",handler:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1\xa0$2")}}),function(){function n(e,n,r,a){return n+r.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+a}e.rule({name:"common/nbsp/nowrap",queue:"end",handler:function(e){return e.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,n).replace(/(<nobr>)(.*?)(<\/nobr>)/g,n)}})}(),e.rule({name:"common/nbsp/replaceNbsp",queue:"utf",live:!0,handler:function(e){return e.replace(/\u00A0/g," ")}}),e.rule({name:"common/number/fraction",handler:function(e){return e.replace(/(^|\D)1\/2(\D|$)/g,"$1\xbd$2").replace(/(^|\D)1\/4(\D|$)/g,"$1\xbc$2").replace(/(^|\D)3\/4(\D|$)/g,"$1\xbe$2")}}),e.rule({name:"common/number/mathSigns",handler:function(n){return e._replace(n,[[/!=/g,"\u2260"],[/<=/g,"\u2264"],[/(^|[^=])>=/g,"$1\u2265"],[/<=>/g,"\u21d4"],[/<</g,"\u226a"],[/>>/g,"\u226b"],[/~=/g,"\u2245"],[/(^|[^+])\+-/g,"$1\xb1"]])}}),e.rule({name:"common/number/times",handler:function(e){return e.replace(/(\d)[ \u00A0]?(x|\u0445)[ \u00A0]?(\d)/g,"$1\xd7$3")}}),e.rule({name:"common/other/delBOM",queue:"start",index:-1,handler:function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}}),e.rule({name:"common/other/repeatWord",handler:function(e){var n=new RegExp("(["+this._data("l")+"\u0301]+) \\1([;:,.?! \n])","gi");return e.replace(n,"$1$2")},disabled:!0}),e.rule({name:"common/punctuation/delDoublePunctuation",handler:function(e){return e.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?\.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}}),e.rule({name:"common/space/afterPunctuation",handler:function(n){var r=e._privateLabel,a=new RegExp("(!|;|\\?)([^).!;?\\s[\\])"+r+e.data("common/quote")+"])","g"),t=new RegExp('(\\D)(,|:)([^)",:.?\\s\\/\\\\'+r+"])","g");return n.replace(a,"$1 $2").replace(t,"$1$2 $3")}}),e.rule({name:"common/space/beforeBracket",handler:function(e){var n=new RegExp("(["+this._data("l")+".!?,;\u2026)])\\(","gi");return e.replace(n,"$1 (")}}),e.rule({name:"common/space/bracket",handler:function(e){return e.replace(/(\() +/g,"(").replace(/ +\)/g,")")}}),e.rule({name:"common/space/delBeforePercent",handler:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}}),e.rule({name:"common/space/delBeforePunctuation",handler:function(e){return e.replace(/ ([!;,?.:])(?!\))/g,"$1")}}),e.rule({name:"common/space/delLeadingBlanks",handler:function(e){return e.replace(/\n[ \t]+/g,"\n")},disabled:!0}),e.rule({name:"common/space/delRepeatN",index:"-1",handler:function(e){return e.replace(/\n{3,}/g,"\n\n")}}),e.rule({name:"common/space/delRepeatSpace",index:"-1",handler:function(e){return e.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}}),e.rule({name:"common/space/delTrailingBlanks",index:"-3",handler:function(e){return e.replace(/[ \t]+\n/g,"\n")}}),e.rule({name:"common/space/replaceTab",index:"-5",handler:function(e){return e.replace(/\t/g," ")}}),e.rule({name:"common/space/squareBracket",handler:function(e){return e.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}}),e.rule({name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}}),e.rule({name:"common/space/trimRight",index:"-3",live:!1,handler:String.prototype.trimRight?function(e){return e.trimRight()}:function(e){return e.replace(/[\s\uFEFF\xA0]+$/g,"")}}),e.rule({name:"common/symbols/arrow",handler:function(n){return e._replace(n,[[/(^|[^-])->(?!>)/g,"$1\u2192"],[/(^|[^<])<-(?!-)/g,"$1\u2190"]])}}),e.rule({name:"common/symbols/cf",handler:function(e){var n=new RegExp('(\\d+)( |\xa0)?(C|F)([\\W \\.,:!\\?"\\]\\)]|$)',"g");return e.replace(n,"$1\u2009\xb0$3$4")}}),e.rule({name:"common/symbols/copy",handler:function(n){return e._replace(n,[[/\(r\)/gi,"\xae"],[/(copyright )?\((c|\u0441)\)/gi,"\xa9"],[/\(tm\)/gi,"\u2122"]])}}),e.rule({name:"en/punctuation/quote",handler:function(e,n){return this._quote(e,n)},settings:{lquote:"\u201c",rquote:"\u201d",lquote2:"\u2018",rquote2:"\u2019"}}),e.rule({name:"ru/dash/centuries",handler:function(n){var r="("+e.data("common/dash")+")",a=new RegExp("(X|I|V)[ |\xa0]?"+r+"[ |\xa0]?(X|I|V)","g");return n.replace(a,"$1"+this.setting("ru/dash/centuries","dash")+"$3")},settings:{dash:"\u2014"}}),e.rule({name:"ru/dash/daysMonth",handler:function(n){var r=new RegExp("(^|\\s)([123]?\\d)("+e.data("common/dash")+")([123]?\\d)[ \xa0]("+e.data("ru/monthGenCase")+")","g");return n.replace(r,"$1$2\u2014$4\xa0$5")}}),e.rule({name:"ru/dash/decade",handler:function(n){var r=new RegExp("(^|\\s)(\\d{3}|\\d)0("+e.data("common/dash")+")(\\d{3}|\\d)0(-\u0435[ \xa0])(?=\u0433\\.?[ \xa0]?\u0433|\u0433\u043e\u0434)","g");return n.replace(r,"$1$20\u2014$40$5")}}),e.rule({name:"ru/dash/directSpeech",handler:function(n){var r=e.data("common/dash"),a=new RegExp('(["\xbb\u2018\u201c,])[ |\xa0]?('+r+")[ |\xa0]","g"),t=new RegExp("(^|"+e._privateLabel+")("+r+")( |\xa0)","gm"),u=new RegExp("([.\u2026?!])[ \xa0]("+r+")[ \xa0]","g");return n.replace(a,"$1\xa0\u2014 ").replace(t,"$1\u2014\xa0").replace(u,"$1 \u2014\xa0")}}),e.rule({name:"ru/dash/izpod",handler:function(n){var r=new RegExp(e.data("ru/dashBefore")+"(\u0418|\u0438)\u0437 \u043f\u043e\u0434"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1$2\u0437-\u043f\u043e\u0434$3")}}),e.rule({name:"ru/dash/izza",handler:function(n){var r=new RegExp(e.data("ru/dashBefore")+"(\u0418|\u0438)\u0437 \u0437\u0430"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1$2\u0437-\u0437\u0430$3")}}),e.rule({name:"ru/dash/kade",handler:function(n){var r=new RegExp("([a-\u044f\u0451]+)( | ?- ?)(\u043a\u0430|\u0434\u0435|\u043a\u0430\u0441\u044c)"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1-$3$4")}}),e.rule({name:"ru/dash/koe",handler:function(n){var r=new RegExp(e.data("ru/dashBefore")+"([\u041a\u043a]\u043e[\u0435\u0439])\\s([\u0430-\u044f\u0451]{3,})"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1$2-$3$4")}}),e.rule({name:"ru/dash/main",index:"-5",handler:function(n){var r=e.data("common/dash"),a=new RegExp("( |\xa0)("+r+")( |\\n)","g");return n.replace(a,"\xa0\u2014$3")}}),e.rule({name:"ru/dash/month",handler:function(n){var r="("+e.data("ru/month")+")",a="("+e.data("ru/monthPreCase")+")",t=e.data("common/dash"),u=new RegExp(r+" ?("+t+") ?"+r,"gi"),l=new RegExp(a+" ?("+t+") ?"+a,"gi");return n.replace(u,"$1\u2014$3").replace(l,"$1\u2014$3")}}),e.rule({name:"ru/dash/surname",handler:function(e){var n=new RegExp("([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)\\s-([\u0430-\u044f\u0451]{1,3})(?![^\u0430-\u044f\u0451]|$)","g");return e.replace(n,"$1\xa0\u2014$2")}}),e.rule({name:"ru/dash/taki",handler:function(n){var r=new RegExp("(\u0432\u0435\u0440\u043d\u043e|\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e|\u043e\u043f\u044f\u0442\u044c|\u043f\u0440\u044f\u043c\u043e|\u0442\u0430\u043a|\u0432\u0441[\u0435\u0451]|\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e|\u043d\u0435\u0443\u0436\u0435\u043b\u0438)\\s(\u0442\u0430\u043a\u0438)"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1-$2$3")}}),e.rule({name:"ru/dash/time",handler:function(n){var r=new RegExp(e.data("ru/dashBefore")+"(\\d?\\d:[0-5]\\d)"+e.data("common/dash")+"(\\d?\\d:[0-5]\\d)"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1$2\u2014$3$4")}}),e.rule({name:"ru/dash/to",handler:function(n){var r=["\u043e\u0442\u043a\u0443\u0434\u0430","\u043a\u0443\u0434\u0430","\u0433\u0434\u0435","\u043a\u043e\u0433\u0434\u0430","\u0437\u0430\u0447\u0435\u043c","\u043f\u043e\u0447\u0435\u043c\u0443","\u043a\u0430\u043a","\u043a\u0430\u043a\u043e[\u0435\u0439\u043c]","\u043a\u0430\u043a\u0430\u044f","\u043a\u0430\u043a\u0438[\u0435\u043c\u0445]","\u043a\u0430\u043a\u0438\u043c\u0438","\u043a\u0430\u043a\u0443\u044e","\u0447\u0442\u043e","\u0447\u0435\u0433\u043e","\u0447\u0435[\u0439\u043c]","\u0447\u044c\u0438\u043c?","\u043a\u0442\u043e","\u043a\u043e\u0433\u043e","\u043a\u043e\u043c\u0443","\u043a\u0435\u043c"],a=new RegExp("("+r.join("|")+")( | ?- ?)(\u0442\u043e|\u043b\u0438\u0431\u043e|\u043d\u0438\u0431\u0443\u0434\u044c)"+e.data("ru/dashAfter"),"gi");return n.replace(a,"$1-$3$4")}}),e.rule({name:"ru/dash/weekday",handler:function(n){var r="("+e.data("ru/weekday")+")",a=new RegExp(r+" ?("+e.data("common/dash")+") ?"+r,"gi");return n.replace(a,"$1\u2014$3")}}),e.rule({name:"ru/dash/years",handler:function(n){var r=this.setting("ru/dash/years","dash"),a=e.data("common/dash"),t=new RegExp("(\\D|^)(\\d{4})[ \xa0]?("+a+")[ \xa0]?(\\d{4})(?=[ \xa0]?\u0433)","g");return n.replace(t,function(e,n,a,t,u){return parseInt(a,10)<parseInt(u,10)?n+a+r+u:e})},settings:{dash:"\u2014"}}),e.rule({name:"ru/date/fromISO",handler:function(e){var n="(-|\\.|\\/)",r="(-|\\/)",a=new RegExp("(^|\\D)(\\d{4})"+n+"(\\d{2})"+n+"(\\d{2})(\\D|$)","gi"),t=new RegExp("(^|\\D)(\\d{2})"+r+"(\\d{2})"+r+"(\\d{4})(\\D|$)","gi");return e.replace(a,"$1$6.$4.$2$7").replace(t,"$1$4.$2.$6$7")}}),e.rule({name:"ru/date/weekday",handler:function(n){var r="( |\xa0)",a=e.data("ru/monthGenCase"),t=e.data("ru/weekday"),u=new RegExp("(\\d)"+r+"("+a+"),"+r+"("+t+")","gi");return n.replace(u,function(){var e=arguments;return e[1]+e[2]+e[3].toLowerCase()+","+e[4]+e[5].toLowerCase()})}}),e.rule({name:"ru/money/dollar",handler:function(e){var n=new RegExp("(^|[\\D]{2,})\\$ ?([\\d.,]+([ \xa0\u2009\u202f]\\d{3})*)","g"),r=new RegExp("(^|[\\D])([\\d.,]+) ?\\$","g"),a="$1$2\xa0$";return e.replace(n,a).replace(r,a)}}),e.rule({name:"ru/money/euro",handler:function(e){var n=new RegExp("(^|[\\D]{2,})\u20ac ?([\\d.,]+([ \xa0\u2009\u202f]\\d{3})*)","g"),r=new RegExp("(^|[\\D])([\\d.,]+) ?\u20ac","g"),a="$1$2\xa0\u20ac";return e.replace(n,a).replace(r,a)}}),e.rule({name:"ru/money/ruble",handler:function(e){var n="$1\xa0\u20bd";return e.replace(/^(\d+)( |\u00A0)?(\u0440|\u0440\u0443\u0431)\.$/,n).replace(/(\d+)( |\u00A0)?(\u0440|\u0440\u0443\u0431)\.(?=[!?,:;])/g,n).replace(/(\d+)( |\u00A0)?(\u0440|\u0440\u0443\u0431)\.(?=\s+[A-\u042f\u0401])/g,n+".")},disabled:!0}),e.rule({name:"ru/nbsp/abbr",handler:function(n){var r=new RegExp("(^|\\s|"+e._privateLabel+")(([\u0430-\u044f\u0451]{1,3}\\.){2,})(?![\u0430-\u044f\u0451])","g");return n.replace(r,function(e,n,r){var a=r.split(/\./);return["\u0440\u0444","\u0440\u0443","\u0440\u0443\u0441","\u043e\u0440\u0433","\u0443\u043a\u0440","\u0431\u0433","\u0441\u0440\u0431"].indexOf(a[a.length-2])>-1?e:n+r.split(/\./).join(".\xa0").trim()})}}),e.rule({name:"ru/nbsp/addr",handler:function(e){return e.replace(/(\s|^)(\u0434\u043e\u043c|\u0434\.|\u043a\u0432\.|\u043f\u043e\u0434\.|\u043f\-\u0434) *(\d+)/gi,"$1$2\xa0$3").replace(/(\s|^)(\u043c\u043a\u0440-\u043d|\u043c\u043a-\u043d|\u043c\u043a\u0440\.|\u043c\u043a\u0440\u043d)\s/gi,"$1$2\xa0").replace(/(\s|^)(\u044d\u0442\.) *(-?\d+)/gi,"$1$2\xa0$3").replace(/(\s|^)(\d+) +\u044d\u0442\u0430\u0436([^\u0430-\u044f\u0451]|$)/gi,"$1$2\xa0\u044d\u0442\u0430\u0436$3").replace(/(\s|^)\u043b\u0438\u0442\u0435\u0440\s([\u0410-\u042f]|$)/gi,"$1\u043b\u0438\u0442\u0435\u0440\xa0$2").replace(/(\s|^)(\u043e\u0431\u043b|\u043a\u0440|\u0441\u0442|\u043f\u043e\u0441|\u0441|\u0434|\u0443\u043b|\u043f\u0435\u0440|\u043f\u0440|\u043f\u0440\-\u0442|\u043f\u0440\u043e\u0441\u043f|\u043f\u043b|\u0431\u0443\u043b|\u0431\-\u0440|\u043d\u0430\u0431|\u0448|\u0442\u0443\u043f|\u043e\u0444|\u043a\u043e\u043c\u043d?|\u0443\u0447|\u0432\u043b|\u0432\u043b\u0430\u0434|\u0441\u0442\u0440|\u043a\u043e\u0440)\. *([\u0430-\u044f\u0451a-z\d]+)/gi,"$1$2.\xa0$3").replace(/(\D[ \u00A0]|^)\u0433\. ?([\u0410-\u042f\u0401])/gm,"$1\u0433.\xa0$2")}}),e.rule({name:"ru/nbsp/afterNumberSign",handler:function(e){return e.replace(/\u2116[ \u00A0\u2009]?(\d|\u043f\/\u043f)/g,"\u2116\u202f$1")}}),e.rule({name:"ru/nbsp/beforeParticle",index:"+5",handler:function(e){var n="(\u043b\u0438|\u043b\u044c|\u0436\u0435|\u0436|\u0431\u044b|\u0431)",r=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451]) "+n+'(?=[?!,.:;"\u2018\u201c\xbb])',"g"),a=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451])[ \xa0]"+n+"[ \xa0]","g");return e.replace(r,"$1\xa0$2").replace(a,"$1\xa0$2 ")}}),e.rule({name:"ru/nbsp/centuries",handler:function(n){var r=e.data("common/dash"),a=new RegExp("(^|\\s)([VIX]+)[ \xa0]?\u0432\\.?(?=[^.]|$)","g"),t=new RegExp("(^|\\s)([VIX]+)("+r+")([VIX]+)[ \xa0]?\u0432\\.?([ \xa0]?\u0432\\.?)?(?=[^.]|$)","g");return n.replace(a,"$1$2\xa0\u0432.").replace(t,"$1$2$3$4\xa0\u0432\u0432.")}}),e.rule({name:"ru/nbsp/dayMonth",handler:function(n){var r=new RegExp("(\\d{1,2}) ("+e.data("ru/shortMonth")+")","gi");return n.replace(r,"$1\xa0$2")}}),e.rule({name:"ru/nbsp/m",index:"+5",handler:function(n){var r=e._privateLabel,a=new RegExp("(^|[\\s,."+r+"])(\\d+)[ \xa0]?(\u043c\u043c?|\u0441\u043c|\u043a\u043c|\u0434\u043c|\u0433\u043c|mm?|km|cm|dm)([23\xb2\xb3])?([\\s.!?,;"+r+"]|$)","gm");return n.replace(a,function(e,n,r,a,t,u){var l={2:"\xb2","\xb2":"\xb2",3:"\xb3","\xb3":"\xb3","":""}[t||""];return n+r+"\xa0"+a+l+("\xa0"===u?" ":u)})}}),e.rule({name:"ru/nbsp/ooo",handler:function(e){return e.replace(/(^|[^a-\u044f\u0451A-\u042f\u0401])(\u041e\u041e\u041e|\u041e\u0410\u041e|\u0417\u0410\u041e|\u041d\u0418\u0418|\u041f\u0411\u041e\u042e\u041b) /g,"$1$2\xa0")}}),e.rule({name:"ru/nbsp/page",handler:function(n){var r=new RegExp("(^|[)\\s"+e._privateLabel+"])(\u0441\u0442\u0440|\u0433\u043b|\u0440\u0438\u0441|\u0438\u043b\u043b?|\u0441\u0442|\u043f|c)\\. *(\\d+)([\\s.,?!;:]|$)","gim");return n.replace(r,"$1$2.\xa0$3$4")}}),e.rule({name:"ru/nbsp/ps",handler:function(n){var r=new RegExp("(^|\\s|"+e._privateLabel+")[p\u0437]\\.[ \xa0]?([p\u0437]\\.[ \xa0]?)?[s\u044b]\\.:? ","gim");return n.replace(r,function(e,n,r){return n+(r?"P.\xa0P.\xa0S. ":"P.\xa0S. ")})}}),e.rule({name:"ru/nbsp/see",handler:function(n){var r=new RegExp("(^|\\s|"+e._privateLabel+"|\\()(\u0441\u043c|\u0438\u043c)\\.[ \xa0]?([\u0430-\u044f\u04510-9a-z]+)([\\s.,?!]|$)","gi");return n.replace(r,function(e,n,r,a,t){return("\xa0"===n?" ":n)+r+".\xa0"+a+t})}}),e.rule({name:"ru/nbsp/year",handler:function(e){return e.replace(/(^|\D)(\d{4}) ?\u0433([ ,;.\n]|$)/g,"$1$2\xa0\u0433$3")}}),e.rule({name:"ru/nbsp/years",index:"+5",handler:function(n){var r=e.data("common/dash"),a=new RegExp("(^|\\D)(\\d{4})("+r+")(\\d{4})[ \xa0]?\u0433\\.?([ \xa0]?\u0433\\.)?","g");return n.replace(a,"$1$2$3$4\xa0\u0433\u0433.")}}),e.rule({name:"ru/number/ordinals",handler:function(e){var n=new RegExp("(\\d)-(\u044b\u0439|\u043e\u0439|\u0430\u044f|\u043e\u0435|\u044b\u0435|\u044b\u043c|\u043e\u043c|\u044b\u0445|\u043e\u0433\u043e|\u043e\u043c\u0443|\u044b\u043c\u0438)(?!["+this._data("l")+"])","g");return e.replace(n,function(e,n,r){var a={"\u043e\u0439":"\u0439","\u044b\u0439":"\u0439","\u0430\u044f":"\u044f","\u043e\u0435":"\u0435","\u044b\u0435":"\u0435","\u044b\u043c":"\u043c","\u043e\u043c":"\u043c","\u044b\u0445":"\u0445","\u043e\u0433\u043e":"\u0433\u043e","\u043e\u043c\u0443":"\u043c\u0443","\u044b\u043c\u0438":"\u043c\u0438"};return n+"-"+a[r]})}}),e.rule({name:"ru/optalign/bracket",handler:function(e,n){return e.replace(/( |\u00A0)\(/g,'<span class="typograf-oa-sp-lbracket">$1</span><span class="typograf-oa-lbracket">(</span>').replace(/^\(/gm,'<span class="typograf-oa-n-lbracket">(</span>')},disabled:!0}).innerRule({name:"ru/optalign/bracket",handler:function(e){return e.replace(/<span class="typograf-oa-(n-|sp-)?lbracket">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/optalign/comma",handler:function(e,n){var r=new RegExp("(["+this._data("l")+"\\d\u0301]+), ","gi");return e.replace(r,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0}).innerRule({name:"ru/optalign/comma",handler:function(e){return e.replace(/<span class="typograf-oa-comma(-sp)?">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/optalign/quote",handler:function(n){var r="ru/punctuation/quote",a='(["'+this.setting(r,"lquote")+this.setting(r,"lquote2")+this.setting(r,"lquote3")+"])",t=new RegExp("([\\d"+this._data("l")+"\\-\u0301!?.:;,]+)( |\xa0)("+a+")","gi"),u=new RegExp("(^|"+e._privateLabel+")"+a,"gm");return n.replace(t,'$1<span class="typograf-oa-sp-lquote">$2</span><span class="typograf-oa-lquote">$3</span>').replace(u,'$1<span class="typograf-oa-n-lquote">$2</span>')},disabled:!0}).innerRule({name:"ru/optalign/quote",handler:function(e){return e.replace(/<span class="typograf-oa-(n-|sp-)?lquote">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/other/accent",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])([\u0410\u0415\u0401\u0418\u041e\u0423\u042b\u042d\u042e\u042f])([^\u0410-\u042f\u0401\w]|$)/g,function(e,n,r,a){return n+r.toLowerCase()+"\u0301"+a})},disabled:!0}),e.rule({name:"ru/punctuation/ano",handler:function(e){var n=new RegExp("([^!?,:;\\-\u2012\u2013\u2014])([ \xa0\n])(\u0430|\u043d\u043e)(?= |\xa0|\n)","g");return e.replace(n,"$1,$2$3")}}),e.rule({name:"ru/punctuation/apostrophe",index:"-5",handler:function(e){var n="(["+this._data("l")+"])",r=new RegExp(n+"['\u2019]"+n,"gi");return e.replace(r,"$1\u02bc$2"); | ||
}}),e.rule({name:"ru/punctuation/exclamation",live:!1,handler:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/,"$1!!!$2")}}),e.rule({name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(e){var n=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(n,"$1?!$2")}}),e.rule({name:"ru/punctuation/hellip",handler:function(e){return e.replace(/(^|[^.])\.{3,4}([^.]|$)/g,"$1\u2026$2").replace(/(^|[^.])(\.\.\.|\u2026),/g,"$1\u2026").replace(/(\!|\?)(\.\.\.|\u2026)([^.]|$)/g,"$1..$3")}}),e.rule({name:"ru/punctuation/quote",handler:function(e,n){var r=n.lquote,a=n.rquote;return e=this._quote(e,n),r===n.lquote2&&a===n.rquote2?e.replace(new RegExp(r+r,"g"),r).replace(new RegExp(a+a,"g"),a):e},settings:{lquote:"\xab",rquote:"\xbb",lquote2:"\u201e",rquote2:"\u201c",lquote3:"\u201a",rquote3:"\u2018"}}),e.rule({name:"ru/space/afterHellip",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])(\.\.\.|\u2026)([\u0410-\u042f\u0401])/g,"$1$2 $3").replace(/([?!]\.\.)([\u0430-\u044f\u0451a-z])/gi,"$1 $2")}}),e.rule({name:"ru/space/year",handler:function(e){var n=new RegExp("(^| |\xa0)(\\d{3,4})(\u0433\u043e\u0434([\u0430\u0443\u0435]|\u043e\u043c)?)([^"+this._data("l")+"]|$)","g");return e.replace(n,"$1$2 $3$5")}}),e._sortRules(),e._needSortRules=!0,e}); | ||
!function(e,n){"function"==typeof define&&define.amd?define("typograf",[],n):"object"==typeof exports?module.exports=n():e.Typograf=n()}(this,function(){"use strict";function e(e){this._prefs="object"==typeof e?e:{},this._prefs.live=this._prefs.live||!1,this._settings={},this._enabledRules={},this._replaceLabel=this._replaceLabel.bind(this),this._pasteLabel=this._pasteLabel.bind(this),this._initSafeTags(),this._rules.forEach(this._prepareRule,this),this._prefs.disable&&this.disable(this._prefs.disable),this._prefs.enable&&this.enable(this._prefs.enable)}return e.rule=function(n){var r=n.name.split("/");return n._enabled=n.disabled===!0?!1:!0,n._lang=r[0],n._group=r[1],n._name=r[2],e._setIndex(n),"common"!==n._lang&&-1!==e._langs.indexOf(n._lang)&&e._langs.push(n._lang),e.prototype._rules.push(n),e._needSortRules&&this._sortRules(),this},e._setIndex=function(n){var r=n.index,a=typeof r,t=e.groupIndexes[n._group];"undefined"===a?r=t:"string"===a&&(r=t+parseInt(n.index,10)),n._index=r},e.innerRule=function(n){return e.prototype._innerRules.push(n),n._lang=n.name.split("/")[0],this},e.data=function(n,r){if("string"==typeof n){if(1===arguments.length)return e._data[n];e._data[n]=r}else"object"==typeof n&&Object.keys(n).forEach(function(r){e._data[r]=n[r]})},e._data={},e._sortRules=function(){e.prototype._rules.sort(function(e,n){return e._index>n._index?1:-1})},e._replace=function(e,n){for(var r=0;r<n.length;r++)e=e.replace(n[r][0],n[r][1]);return e},e._langs=[],e._privateLabel="\udbff",e.prototype={constructor:e,execute:function(e,n){n=n||{};var r=this,a=n.lang||this._prefs.lang||"common",t={},u={},l="undefined"==typeof n.mode?this._prefs.mode:n.mode,i=function(n){var r=n._lang,t=this._prefs.live;t===!0&&n.live===!1||t===!1&&n.live===!0||"common"!==r&&r!==a||!this.enabled(n.name)||(this._onBeforeRule&&this._onBeforeRule(e),e=n.handler.call(this,e,this._settings[n.name]),this._onAfterRule&&this._onAfterRule(e))},s=function(e){u[e]&&u[e].forEach(i,r),t[e]&&t[e].forEach(i,r)};return this._lang=a,(e=""+e)?(e=this._fixLineEnd(e),this._innerRules.forEach(function(e){var n=e.queue;u[n]=u[n]||[],u[n].push(e)},this),this._rules.forEach(function(e){var n=e.queue;t[n]=t[n]||[],t[n].push(e)},this),this._isHTML=-1!==e.search(/(<\/?[a-z]|<!|&[lg]t;)/i),s("start"),e=this._hideSafeTags(e),e=this._utfication(e),s("utf"),s(),e=this._modification(e,l),s("entity"),e=this._showSafeTags(e),s("end"),this._lang=null,this._isHTML=null,e):""},setting:function(e,n,r){return arguments.length<=2?this._settings[e]&&this._settings[e][n]:(this._settings[e]=this._settings[e]||{},this._settings[e][n]=r,this)},enabled:function(e){return this._enabledRules[e]},disabled:function(e){return!this._enabledRules[e]},enable:function(e){return this._enable(e,!0)},disable:function(e){return this._enable(e,!1)},addSafeTag:function(e,n,r){var a=e instanceof RegExp?e:[e,n,r];return this._safeTags.own.push(this._prepareSafeTag(a)),this},_data:function(n){return e.data(this._lang+"/"+n)},_quote:function(n,r){var a=this._data("l")+"\u0301\\d",t=e._privateLabel,u=r.lquote,l=r.rquote,i=r.lquote2,s=r.rquote2,o="["+e.data("common/quote")+"]",c="["+a+")!?.:;#*,\u2026]*?",p=new RegExp('"(['+a+"])","gi"),d=new RegExp("("+c+')"('+c+")","gi"),h=new RegExp(o,"g"),g=new RegExp("^(\\s)?("+o+")","g"),m=new RegExp("(^|\\s)"+o+t,"g"),f=new RegExp(t+o+"([\\s!?.:;#*,]|$)","g"),$=0;return n=n.replace(h,function(){return $++,'"'}).replace(p,u+"$1").replace(d,"$1"+l+"$2").replace(m,"$1"+u+t).replace(f,t+l+"$1").replace(g,"$1"+u),i&&s&&$%2===0?this._innerQuote(n,r):n},_innerQuote:function(e,n){var r=[n.lquote],a=[n.rquote],t=n.lquote,u=n.rquote,l=new Array(e.length);n.lquote2&&n.rquote2&&(r.push(n.lquote2),a.push(n.rquote2),n.lquote3&&n.rquote3&&(r.push(n.lquote3),a.push(n.rquote3)));for(var i=-1,s=r.length-1,o=0,c=e.length;c>o;o++){var p=e[o];p===t?(i++,i>s&&(i=s),l.push(r[i])):p===u?-1>=i?(i=0,l.push(r[i])):(l.push(a[i]),i--,-1>i&&(i=-1)):l.push(p)}return l.join("")},_fixLineEnd:function(e){return e.replace(/\r\n/g,"\n")},_prepareRule:function(e){var n=e.name,r={};"object"==typeof e.settings&&Object.keys(e.settings).forEach(function(n){r[n]=e.settings[n]}),this._settings[n]=r,this._enabledRules[n]=e._enabled},_enable:function(e,n){return Array.isArray(e)?e.forEach(function(e){this._enableByMask(e,n)},this):this._enableByMask(e,n),this},_enableByMask:function(e,n){var r;-1!==e.search(/\*/)?(r=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*")),this._rules.forEach(function(e){var a=e.name;r.test(a)&&(this._enabledRules[a]=n)},this)):this._enabledRules[e]=n},_rules:[],_innerRules:[],_getRule:function(e){var n=null;return this._rules.some(function(r){return r.name===e?(n=r,!0):!1}),n},_initSafeTags:function(){var e=[["<!--","-->"],["<!ENTITY",">"],["<!DOCTYPE",">"],["<\\?xml","\\?>"],["<!\\[CDATA\\[","\\]\\]>"]];["code","kbd","object","pre","samp","script","style","var"].forEach(function(n){e.push(["<"+n+"(\\s[^>]*?)?>","</"+n+">"])},this),this._safeTags={html:e.map(this._prepareSafeTag),own:[]}},_hideSafeTags:function(e){var n=function(n){e=e.replace(this._prepareSafeTag(n),this._pasteLabel)};return this._hiddenSafeTags={},this._iLabel=0,this._safeTags.own.forEach(n,this),this._isHTML&&(this._safeTags.html.forEach(n,this),e=this._hideHTMLTags(e)),e},_prepareSafeTag:function(e){var n;if(e instanceof RegExp)n=e;else{var r=e[0],a=e[1],t="undefined"==typeof e[2]?"[^]*?":e[2];n=new RegExp(r+t+a,"gi")}return n},_getPrivateLabel:function(n){var r=e._privateLabel;return r+"tf"+n+r},_pasteLabel:function(e){var n=this._getPrivateLabel(this._iLabel);return this._hiddenSafeTags[n]=e,this._iLabel++,n},_replaceLabel:function(e){return this._hiddenSafeTags[e]},_hideHTMLTags:function(e){return e.replace(/<\/?[a-z][^]*?>/gi,this._pasteLabel).replace(/<\/?[a-z][^]*?>/gi,this._pasteLabel).replace(/&[gl]t;/gi,this._pasteLabel)},_showSafeTags:function(n){var r=e._privateLabel,a=new RegExp(r+"tf\\d+"+r,"g"),t=new RegExp(r+"tf\\d"),u=0;Object.keys(this._safeTags).forEach(function(e){u+=e.length});for(var l=0;u>l&&(n=n.replace(a,this._replaceLabel),-1!==n.search(t));l++);return this._hiddenSafeTags={},n},_utfication:function(e){return-1!==e.search(/&#/)&&(e=this._decHexToUtf(e)),-1!==e.search(/&[a-z]/i)&&this.entities.forEach(function(n){e=e.replace(n[3],n[2])}),e.replace(/"/g,'"')},_decHexToUtf:function(e){return e.replace(/&#(\d{1,6});/gi,function(e,n){return String.fromCharCode(parseInt(n,10))}).replace(/&#x([\da-f]{1,6});/gi,function(e,n){return String.fromCharCode(parseInt(n,16))})},_modification:function(e,n){if("name"===n||"digit"===n){var r="name"===n?0:1;this.entities.forEach(function(n){n[r]&&(e=e.replace(n[4],n[r]))})}return e}},e.version="4.2.0",e.groupIndexes={symbols:110,space:210,dash:310,punctuation:410,nbsp:510,number:610,money:710,date:810,other:910,optalign:1010,html:1110},e.prototype.entities=[],[["nbsp",160],["iexcl",161],["cent",162],["pound",163],["curren",164],["yen",165],["brvbar",166],["sect",167],["uml",168],["copy",169],["ordf",170],["laquo",171],["not",172],["shy",173],["reg",174],["macr",175],["deg",176],["plusmn",177],["sup2",178],["sup3",179],["acute",180],["micro",181],["para",182],["middot",183],["cedil",184],["sup1",185],["ordm",186],["raquo",187],["frac14",188],["frac12",189],["frac34",190],["iquest",191],["Agrave",192],["Aacute",193],["Acirc",194],["Atilde",195],["Auml",196],["Aring",197],["AElig",198],["Ccedil",199],["Egrave",200],["Eacute",201],["Ecirc",202],["Euml",203],["Igrave",204],["Iacute",205],["Icirc",206],["Iuml",207],["ETH",208],["Ntilde",209],["Ograve",210],["Oacute",211],["Ocirc",212],["Otilde",213],["Ouml",214],["times",215],["Oslash",216],["Ugrave",217],["Uacute",218],["Ucirc",219],["Uuml",220],["Yacute",221],["THORN",222],["szlig",223],["agrave",224],["aacute",225],["acirc",226],["atilde",227],["auml",228],["aring",229],["aelig",230],["ccedil",231],["egrave",232],["eacute",233],["ecirc",234],["euml",235],["igrave",236],["iacute",237],["icirc",238],["iuml",239],["eth",240],["ntilde",241],["ograve",242],["oacute",243],["ocirc",244],["otilde",245],["ouml",246],["divide",247],["oslash",248],["ugrave",249],["uacute",250],["ucirc",251],["uuml",252],["yacute",253],["thorn",254],["yuml",255],["fnof",402],["Alpha",913],["Beta",914],["Gamma",915],["Delta",916],["Epsilon",917],["Zeta",918],["Eta",919],["Theta",920],["Iota",921],["Kappa",922],["Lambda",923],["Mu",924],["Nu",925],["Xi",926],["Omicron",927],["Pi",928],["Rho",929],["Sigma",931],["Tau",932],["Upsilon",933],["Phi",934],["Chi",935],["Psi",936],["Omega",937],["alpha",945],["beta",946],["gamma",947],["delta",948],["epsilon",949],["zeta",950],["eta",951],["theta",952],["iota",953],["kappa",954],["lambda",955],["mu",956],["nu",957],["xi",958],["omicron",959],["pi",960],["rho",961],["sigmaf",962],["sigma",963],["tau",964],["upsilon",965],["phi",966],["chi",967],["psi",968],["omega",969],["thetasym",977],["upsih",978],["piv",982],["bull",8226],["hellip",8230],["prime",8242],["Prime",8243],["oline",8254],["frasl",8260],["weierp",8472],["image",8465],["real",8476],["trade",8482],["alefsym",8501],["larr",8592],["uarr",8593],["rarr",8594],["darr",8595],["harr",8596],["crarr",8629],["lArr",8656],["uArr",8657],["rArr",8658],["dArr",8659],["hArr",8660],["forall",8704],["part",8706],["exist",8707],["empty",8709],["nabla",8711],["isin",8712],["notin",8713],["ni",8715],["prod",8719],["sum",8721],["minus",8722],["lowast",8727],["radic",8730],["prop",8733],["infin",8734],["ang",8736],["and",8743],["or",8744],["cap",8745],["cup",8746],["int",8747],["there4",8756],["sim",8764],["cong",8773],["asymp",8776],["ne",8800],["equiv",8801],["le",8804],["ge",8805],["sub",8834],["sup",8835],["nsub",8836],["sube",8838],["supe",8839],["oplus",8853],["otimes",8855],["perp",8869],["sdot",8901],["lceil",8968],["rceil",8969],["lfloor",8970],["rfloor",8971],["lang",9001],["rang",9002],["spades",9824],["clubs",9827],["hearts",9829],["diams",9830],["loz",9674],["OElig",338],["oelig",339],["Scaron",352],["scaron",353],["Yuml",376],["circ",710],["tilde",732],["ensp",8194],["emsp",8195],["thinsp",8201],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207],["ndash",8211],["mdash",8212],["lsquo",8216],["rsquo",8217],["sbquo",8218],["ldquo",8220],["rdquo",8221],["bdquo",8222],["dagger",8224],["Dagger",8225],["permil",8240],["lsaquo",8249],["rsaquo",8250],["euro",8364],["NestedGreaterGreater",8811],["NestedLessLess",8810]].forEach(function(n){var r=n[0],a=n[1],t=String.fromCharCode(a),u=["&"+r+";","&#"+a+";",t,new RegExp("&"+r+";","g"),new RegExp(t,"g")];e.prototype.entities.push(u)},this),e.data("common/dash","--?|\u2012|\u2013|\u2014"),e.data("common/quote",'\xab\u2039\xbb\u203a\u201e\u201a\u201c\u201f\u2018\u201b\u201d\u2019"'),e.data({"en/l":"a-z","en/L":"A-Z","en/lL":"a-zA-Z"}),e._langs.push("en"),e.data({"ru/dashBefore":"(^| |\\n)","ru/dashAfter":"([\xa0 ,.?:!]|$)"}),e.data({"ru/l":"\u0430-\u044f\u0451a-z","ru/L":"\u0410-\u042f\u0401A-Z","ru/lL":"\u0430-\u044f\u0451\u0410-\u042f\u0401a-zA-Z"}),e._langs.push("ru"),e.data({"ru/month":"\u044f\u043d\u0432\u0430\u0440\u044c|\u0444\u0435\u0432\u0440\u0430\u043b\u044c|\u043c\u0430\u0440\u0442|\u0430\u043f\u0440\u0435\u043b\u044c|\u043c\u0430\u0439|\u0438\u044e\u043d\u044c|\u0438\u044e\u043b\u044c|\u0430\u0432\u0433\u0443\u0441\u0442|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c|\u043e\u043a\u0442\u044f\u0431\u0440\u044c|\u043d\u043e\u044f\u0431\u0440\u044c|\u0434\u0435\u043a\u0430\u0431\u0440\u044c","ru/monthGenCase":"\u044f\u043d\u0432\u0430\u0440\u044f|\u0444\u0435\u0432\u0440\u0430\u043b\u044f|\u043c\u0430\u0440\u0442\u0430|\u0430\u043f\u0440\u0435\u043b\u044f|\u043c\u0430\u044f|\u0438\u044e\u043d\u044f|\u0438\u044e\u043b\u044f|\u0430\u0432\u0433\u0443\u0441\u0442\u0430|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f|\u043e\u043a\u0442\u044f\u0431\u0440\u044f|\u043d\u043e\u044f\u0431\u0440\u044f|\u0434\u0435\u043a\u0430\u0431\u0440\u044f","ru/monthPreCase":"\u044f\u043d\u0432\u0430\u0440\u0435|\u0444\u0435\u0432\u0440\u0430\u043b\u0435|\u043c\u0430\u0440\u0442\u0435|\u0430\u043f\u0440\u0435\u043b\u0435|\u043c\u0430\u0435|\u0438\u044e\u043d\u0435|\u0438\u044e\u043b\u0435|\u0430\u0432\u0433\u0443\u0441\u0442\u0435|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0435|\u043e\u043a\u0442\u044f\u0431\u0440\u0435|\u043d\u043e\u044f\u0431\u0440\u0435|\u0434\u0435\u043a\u0430\u0431\u0440\u0435","ru/shortMonth":"\u044f\u043d\u0432|\u0444\u0435\u0432|\u043c\u0430\u0440|\u0430\u043f\u0440|\u043c\u0430[\u0435\u0439\u044f]|\u0438\u044e\u043d|\u0438\u044e\u043b|\u0430\u0432\u0433|\u0441\u0435\u043d|\u043e\u043a\u0442|\u043d\u043e\u044f|\u0434\u0435\u043a"}),e.data("ru/weekday","\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a|\u0432\u0442\u043e\u0440\u043d\u0438\u043a|\u0441\u0440\u0435\u0434\u0430|\u0447\u0435\u0442\u0432\u0435\u0440\u0433|\u043f\u044f\u0442\u043d\u0438\u0446\u0430|\u0441\u0443\u0431\u0431\u043e\u0442\u0430|\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435"),e.rule({name:"common/html/e-mail",handler:function(e){return e.replace(/(^|[\s;(])([\w\-.]{2,})@([\w\-.]{2,})\.([a-z]{2,6})([)\s.,!?]|$)/gi,'$1<a href="mailto:$2@$3.$4">$2@$3.$4</a>$5')},disabled:!0}),e.rule({name:"common/html/escape",index:"+100",queue:"end",handler:function(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return e.replace(/[&<>"'\/]/g,function(e){return n[e]})},disabled:!0}),e.rule({name:"common/html/nbr",index:"+5",queue:"end",handler:function(e){return-1===e.search(/<br/)?e.replace(/\n/g,"<br/>\n"):e},disabled:!0}),e.rule({name:"common/html/pbr",queue:"end",handler:function(e){return-1===e.search(/<(p|br)[\s\/>]/)&&(-1===e.search(/\n/)?e="<p>"+e+"</p>":(e="<p>"+e.replace(/\n\n/g,"</p>\n<p>")+"</p>",e=e.replace(/([^>])\n/g,"$1<br/>\n"))),e},disabled:!0}),e.rule({name:"common/html/stripTags",index:"+99",queue:"end",handler:function(e){return e.replace(/<[^>]+>/g,"")},disabled:!0}),e.rule({name:"common/html/url",handler:function(e){var n="(http|https|ftp|telnet|news|gopher|file|wais)://",r="([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)",a=new RegExp(n+r,"g");return e.replace(a,function(e,n,r){r=r.replace(/([^\/]+\/?)(\?|#)$/,"$1").replace(/^([^\/]+)\/$/,"$1"),"http"===n?r=r.replace(/^([^\/]+)(:80)([^\d]|\/|$)/,"$1$3"):"https"===n&&(r=r.replace(/^([^\/]+)(:443)([^\d]|\/|$)/,"$1$3"));var a=r,t=n+"://"+r,u='<a href="'+t+'">';return"http"===n||"https"===n?(a=a.replace(/^www\./,""),u+("http"===n?a:n+"://"+a)+"</a>"):u+t+"</a>"})},disabled:!0}),e.rule({name:"common/nbsp/afterNumber",handler:function(e){var n="(^|\\D)(\\d{1,5}) (["+this._data("l")+"]{2,})";return e.replace(new RegExp(n,"gi"),"$1$2\xa0$3")},disabled:!0}),e.rule({name:"common/nbsp/afterParagraph",handler:function(e){return e.replace(/\u00A7[ \u00A0\u2009]?(\d|I|V|X)/g,"\xa7\u202f$1")}}),e.rule({name:"common/nbsp/afterShortWord",handler:function(n,r){var a=r.lengthShortWord,t=" \xa0("+e._privateLabel+e.data("common/quote"),u="(^|["+t+"])(["+this._data("l")+"]{1,"+a+"}) ",l="$1$2\xa0",i=new RegExp(u,"gim");return n.replace(i,l).replace(i,l)},settings:{lengthShortWord:2}}),e.rule({name:"common/nbsp/beforeShortLastWord",handler:function(e,n){var r=new RegExp("(["+this._data("l")+"d]) (["+this._data("lL")+"]{1,"+n.lengthLastWord+"}[.!?\u2026])( ["+this._data("L")+"]|$)","g");return e.replace(r,"$1\xa0$2$3")},settings:{lengthLastWord:3}}),e.rule({name:"common/nbsp/dpi",handler:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1\xa0$2")}}),function(){function n(e,n,r,a){return n+r.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+a}e.rule({name:"common/nbsp/nowrap",queue:"end",handler:function(e){return e.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,n).replace(/(<nobr>)(.*?)(<\/nobr>)/g,n)}})}(),e.rule({name:"common/nbsp/replaceNbsp",queue:"utf",live:!0,handler:function(e){return e.replace(/\u00A0/g," ")}}),e.rule({name:"common/number/fraction",handler:function(e){return e.replace(/(^|\D)1\/2(\D|$)/g,"$1\xbd$2").replace(/(^|\D)1\/4(\D|$)/g,"$1\xbc$2").replace(/(^|\D)3\/4(\D|$)/g,"$1\xbe$2")}}),e.rule({name:"common/number/mathSigns",handler:function(n){return e._replace(n,[[/!=/g,"\u2260"],[/<=/g,"\u2264"],[/(^|[^=])>=/g,"$1\u2265"],[/<=>/g,"\u21d4"],[/<</g,"\u226a"],[/>>/g,"\u226b"],[/~=/g,"\u2245"],[/(^|[^+])\+-/g,"$1\xb1"]])}}),e.rule({name:"common/number/times",handler:function(e){return e.replace(/(\d)[ \u00A0]?[x\u0445][ \u00A0]?(\d)/g,"$1\xd7$2")}}),e.rule({name:"common/other/delBOM",queue:"start",index:-1,handler:function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}}),e.rule({name:"common/other/repeatWord",handler:function(e){var n=new RegExp("(["+this._data("l")+"\u0301]+) \\1([;:,.?! \n])","gi");return e.replace(n,"$1$2")},disabled:!0}),e.rule({name:"common/punctuation/delDoublePunctuation",handler:function(e){return e.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?\.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}}),e.rule({name:"common/space/afterPunctuation",handler:function(n){var r=e._privateLabel,a=new RegExp("(!|;|\\?)([^).!;?\\s[\\])"+r+e.data("common/quote")+"])","g"),t=new RegExp('(\\D)(,|:)([^)",:.?\\s\\/\\\\'+r+"])","g");return n.replace(a,"$1 $2").replace(t,"$1$2 $3")}}),e.rule({name:"common/space/beforeBracket",handler:function(e){var n=new RegExp("(["+this._data("l")+".!?,;\u2026)])\\(","gi");return e.replace(n,"$1 (")}}),e.rule({name:"common/space/bracket",handler:function(e){return e.replace(/(\() +/g,"(").replace(/ +\)/g,")")}}),e.rule({name:"common/space/delBeforePercent",handler:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}}),e.rule({name:"common/space/delBeforePunctuation",handler:function(e){return e.replace(/ ([!;,?.:])(?!\))/g,"$1")}}),e.rule({name:"common/space/delLeadingBlanks",handler:function(e){return e.replace(/\n[ \t]+/g,"\n")},disabled:!0}),e.rule({name:"common/space/delRepeatN",index:"-1",handler:function(e){return e.replace(/\n{3,}/g,"\n\n")}}),e.rule({name:"common/space/delRepeatSpace",index:"-1",handler:function(e){return e.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}}),e.rule({name:"common/space/delTrailingBlanks",index:"-3",handler:function(e){return e.replace(/[ \t]+\n/g,"\n")}}),e.rule({name:"common/space/replaceTab",index:"-5",handler:function(e){return e.replace(/\t/g," ")}}),e.rule({name:"common/space/squareBracket",handler:function(e){return e.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}}),e.rule({name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}}),e.rule({name:"common/space/trimRight",index:"-3",live:!1,handler:String.prototype.trimRight?function(e){return e.trimRight()}:function(e){return e.replace(/[\s\uFEFF\xA0]+$/g,"")}}),e.rule({name:"common/symbols/arrow",handler:function(n){return e._replace(n,[[/(^|[^-])->(?!>)/g,"$1\u2192"],[/(^|[^<])<-(?!-)/g,"$1\u2190"]])}}),e.rule({name:"common/symbols/cf",handler:function(e){var n=new RegExp('(\\d+)( |\xa0)?(C|F)([\\W \\.,:!\\?"\\]\\)]|$)',"g");return e.replace(n,"$1\u2009\xb0$3$4")}}),e.rule({name:"common/symbols/copy",handler:function(n){return e._replace(n,[[/\(r\)/gi,"\xae"],[/(copyright )?\((c|\u0441)\)/gi,"\xa9"],[/\(tm\)/gi,"\u2122"]])}}),e.rule({name:"en/punctuation/quote",handler:function(e,n){return this._quote(e,n)},settings:{lquote:"\u201c",rquote:"\u201d",lquote2:"\u2018",rquote2:"\u2019"}}),e.rule({name:"ru/dash/centuries",handler:function(n){var r="("+e.data("common/dash")+")",a=new RegExp("(X|I|V)[ |\xa0]?"+r+"[ |\xa0]?(X|I|V)","g");return n.replace(a,"$1"+this.setting("ru/dash/centuries","dash")+"$3")},settings:{dash:"\u2014"}}),e.rule({name:"ru/dash/daysMonth",handler:function(n){var r=new RegExp("(^|\\s)([123]?\\d)("+e.data("common/dash")+")([123]?\\d)[ \xa0]("+e.data("ru/monthGenCase")+")","g");return n.replace(r,"$1$2\u2014$4\xa0$5")}}),e.rule({name:"ru/dash/decade",handler:function(n){var r=new RegExp("(^|\\s)(\\d{3}|\\d)0("+e.data("common/dash")+")(\\d{3}|\\d)0(-\u0435[ \xa0])(?=\u0433\\.?[ \xa0]?\u0433|\u0433\u043e\u0434)","g");return n.replace(r,"$1$20\u2014$40$5")}}),e.rule({name:"ru/dash/directSpeech",handler:function(n){var r=e.data("common/dash"),a=new RegExp('(["\xbb\u2018\u201c,])[ |\xa0]?('+r+")[ |\xa0]","g"),t=new RegExp("(^|"+e._privateLabel+")("+r+")( |\xa0)","gm"),u=new RegExp("([.\u2026?!])[ \xa0]("+r+")[ \xa0]","g");return n.replace(a,"$1\xa0\u2014 ").replace(t,"$1\u2014\xa0").replace(u,"$1 \u2014\xa0")}}),e.rule({name:"ru/dash/izpod",handler:function(n){var r=new RegExp(e.data("ru/dashBefore")+"(\u0418|\u0438)\u0437 \u043f\u043e\u0434"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1$2\u0437-\u043f\u043e\u0434$3")}}),e.rule({name:"ru/dash/izza",handler:function(n){var r=new RegExp(e.data("ru/dashBefore")+"(\u0418|\u0438)\u0437 \u0437\u0430"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1$2\u0437-\u0437\u0430$3")}}),e.rule({name:"ru/dash/kade",handler:function(n){var r=new RegExp("([a-\u044f\u0451]+)( | ?- ?)(\u043a\u0430|\u0434\u0435|\u043a\u0430\u0441\u044c)"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1-$3$4")}}),e.rule({name:"ru/dash/koe",handler:function(n){var r=new RegExp(e.data("ru/dashBefore")+"([\u041a\u043a]\u043e[\u0435\u0439])\\s([\u0430-\u044f\u0451]{3,})"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1$2-$3$4")}}),e.rule({name:"ru/dash/main",index:"-5",handler:function(n){var r=e.data("common/dash"),a=new RegExp("( |\xa0)("+r+")( |\\n)","g");return n.replace(a,"\xa0\u2014$3")}}),e.rule({name:"ru/dash/month",handler:function(n){var r="("+e.data("ru/month")+")",a="("+e.data("ru/monthPreCase")+")",t=e.data("common/dash"),u=new RegExp(r+" ?("+t+") ?"+r,"gi"),l=new RegExp(a+" ?("+t+") ?"+a,"gi");return n.replace(u,"$1\u2014$3").replace(l,"$1\u2014$3")}}),e.rule({name:"ru/dash/surname",handler:function(e){var n=new RegExp("([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)\\s-([\u0430-\u044f\u0451]{1,3})(?![^\u0430-\u044f\u0451]|$)","g");return e.replace(n,"$1\xa0\u2014$2")}}),e.rule({name:"ru/dash/taki",handler:function(n){var r=new RegExp("(\u0432\u0435\u0440\u043d\u043e|\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e|\u043e\u043f\u044f\u0442\u044c|\u043f\u0440\u044f\u043c\u043e|\u0442\u0430\u043a|\u0432\u0441[\u0435\u0451]|\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e|\u043d\u0435\u0443\u0436\u0435\u043b\u0438)\\s(\u0442\u0430\u043a\u0438)"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1-$2$3")}}),e.rule({name:"ru/dash/time",handler:function(n){var r=new RegExp(e.data("ru/dashBefore")+"(\\d?\\d:[0-5]\\d)"+e.data("common/dash")+"(\\d?\\d:[0-5]\\d)"+e.data("ru/dashAfter"),"g");return n.replace(r,"$1$2\u2014$3$4")}}),e.rule({name:"ru/dash/to",handler:function(n){var r=["\u043e\u0442\u043a\u0443\u0434\u0430","\u043a\u0443\u0434\u0430","\u0433\u0434\u0435","\u043a\u043e\u0433\u0434\u0430","\u0437\u0430\u0447\u0435\u043c","\u043f\u043e\u0447\u0435\u043c\u0443","\u043a\u0430\u043a","\u043a\u0430\u043a\u043e[\u0435\u0439\u043c]","\u043a\u0430\u043a\u0430\u044f","\u043a\u0430\u043a\u0438[\u0435\u043c\u0445]","\u043a\u0430\u043a\u0438\u043c\u0438","\u043a\u0430\u043a\u0443\u044e","\u0447\u0442\u043e","\u0447\u0435\u0433\u043e","\u0447\u0435[\u0439\u043c]","\u0447\u044c\u0438\u043c?","\u043a\u0442\u043e","\u043a\u043e\u0433\u043e","\u043a\u043e\u043c\u0443","\u043a\u0435\u043c"],a=new RegExp("("+r.join("|")+")( | ?- ?)(\u0442\u043e|\u043b\u0438\u0431\u043e|\u043d\u0438\u0431\u0443\u0434\u044c)"+e.data("ru/dashAfter"),"gi");return n.replace(a,"$1-$3$4")}}),e.rule({name:"ru/dash/weekday",handler:function(n){var r="("+e.data("ru/weekday")+")",a=new RegExp(r+" ?("+e.data("common/dash")+") ?"+r,"gi");return n.replace(a,"$1\u2014$3")}}),e.rule({name:"ru/dash/years",handler:function(n){var r=this.setting("ru/dash/years","dash"),a=e.data("common/dash"),t=new RegExp("(\\D|^)(\\d{4})[ \xa0]?("+a+")[ \xa0]?(\\d{4})(?=[ \xa0]?\u0433)","g");return n.replace(t,function(e,n,a,t,u){return parseInt(a,10)<parseInt(u,10)?n+a+r+u:e})},settings:{dash:"\u2014"}}),e.rule({name:"ru/date/fromISO",handler:function(e){var n="(-|\\.|\\/)",r="(-|\\/)",a=new RegExp("(^|\\D)(\\d{4})"+n+"(\\d{2})"+n+"(\\d{2})(\\D|$)","gi"),t=new RegExp("(^|\\D)(\\d{2})"+r+"(\\d{2})"+r+"(\\d{4})(\\D|$)","gi");return e.replace(a,"$1$6.$4.$2$7").replace(t,"$1$4.$2.$6$7")}}),e.rule({name:"ru/date/weekday",handler:function(n){var r="( |\xa0)",a=e.data("ru/monthGenCase"),t=e.data("ru/weekday"),u=new RegExp("(\\d)"+r+"("+a+"),"+r+"("+t+")","gi");return n.replace(u,function(){var e=arguments;return e[1]+e[2]+e[3].toLowerCase()+","+e[4]+e[5].toLowerCase()})}}),e.rule({name:"ru/money/currency",handler:function(e){var n="([$\u20ac\xa5\u04b0\xa3\u20a4\u20bd])",r=new RegExp("(^|[\\D]{2,})"+n+" ?([\\d.,]+([ \xa0\u2009\u202f]\\d{3})*)","g"),a=new RegExp("(^|[\\D])([\\d.,]+) ?"+n,"g"),t="$1$3\xa0$2",u="$1$2\xa0$3";return e.replace(r,t).replace(a,u)}}),e.rule({name:"ru/money/ruble",handler:function(e){var n="$1\xa0\u20bd",r="(\\d+)( |\xa0)?(\u0440|\u0440\u0443\u0431)\\.",a=new RegExp("^"+r+"$","g"),t=new RegExp(r+"(?=[!?,:;])","g"),u=new RegExp(r+"(?=\\s+[A-\u042f\u0401])","g");return e.replace(a,n).replace(t,n).replace(u,n+".")},disabled:!0}),e.rule({name:"ru/nbsp/abbr",handler:function(n){var r=new RegExp("(^|\\s|"+e._privateLabel+")(([\u0430-\u044f\u0451]{1,3}\\.){2,})(?![\u0430-\u044f\u0451])","g");return n.replace(r,function(e,n,r){var a=r.split(/\./);return["\u0440\u0444","\u0440\u0443","\u0440\u0443\u0441","\u043e\u0440\u0433","\u0443\u043a\u0440","\u0431\u0433","\u0441\u0440\u0431"].indexOf(a[a.length-2])>-1?e:n+r.split(/\./).join(".\xa0").trim()})}}),e.rule({name:"ru/nbsp/addr",handler:function(e){return e.replace(/(\s|^)(\u0434\u043e\u043c|\u0434\.|\u043a\u0432\.|\u043f\u043e\u0434\.|\u043f\-\u0434) *(\d+)/gi,"$1$2\xa0$3").replace(/(\s|^)(\u043c\u043a\u0440-\u043d|\u043c\u043a-\u043d|\u043c\u043a\u0440\.|\u043c\u043a\u0440\u043d)\s/gi,"$1$2\xa0").replace(/(\s|^)(\u044d\u0442\.) *(-?\d+)/gi,"$1$2\xa0$3").replace(/(\s|^)(\d+) +\u044d\u0442\u0430\u0436([^\u0430-\u044f\u0451]|$)/gi,"$1$2\xa0\u044d\u0442\u0430\u0436$3").replace(/(\s|^)\u043b\u0438\u0442\u0435\u0440\s([\u0410-\u042f]|$)/gi,"$1\u043b\u0438\u0442\u0435\u0440\xa0$2").replace(/(\s|^)(\u043e\u0431\u043b|\u043a\u0440|\u0441\u0442|\u043f\u043e\u0441|\u0441|\u0434|\u0443\u043b|\u043f\u0435\u0440|\u043f\u0440|\u043f\u0440\-\u0442|\u043f\u0440\u043e\u0441\u043f|\u043f\u043b|\u0431\u0443\u043b|\u0431\-\u0440|\u043d\u0430\u0431|\u0448|\u0442\u0443\u043f|\u043e\u0444|\u043a\u043e\u043c\u043d?|\u0443\u0447|\u0432\u043b|\u0432\u043b\u0430\u0434|\u0441\u0442\u0440|\u043a\u043e\u0440)\. *([\u0430-\u044f\u0451a-z\d]+)/gi,"$1$2.\xa0$3").replace(/(\D[ \u00A0]|^)\u0433\. ?([\u0410-\u042f\u0401])/gm,"$1\u0433.\xa0$2")}}),e.rule({name:"ru/nbsp/afterNumberSign",handler:function(e){return e.replace(/\u2116[ \u00A0\u2009]?(\d|\u043f\/\u043f)/g,"\u2116\u202f$1")}}),e.rule({name:"ru/nbsp/beforeParticle",index:"+5",handler:function(e){var n="(\u043b\u0438|\u043b\u044c|\u0436\u0435|\u0436|\u0431\u044b|\u0431)",r=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451]) "+n+'(?=[?!,.:;"\u2018\u201c\xbb])',"g"),a=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451])[ \xa0]"+n+"[ \xa0]","g");return e.replace(r,"$1\xa0$2").replace(a,"$1\xa0$2 ")}}),e.rule({name:"ru/nbsp/centuries",handler:function(n){var r=e.data("common/dash"),a=new RegExp("(^|\\s)([VIX]+)[ \xa0]?\u0432\\.?(?=[^.]|$)","g"),t=new RegExp("(^|\\s)([VIX]+)("+r+")([VIX]+)[ \xa0]?\u0432\\.?([ \xa0]?\u0432\\.?)?(?=[^.]|$)","g");return n.replace(a,"$1$2\xa0\u0432.").replace(t,"$1$2$3$4\xa0\u0432\u0432.")}}),e.rule({name:"ru/nbsp/dayMonth",handler:function(n){var r=new RegExp("(\\d{1,2}) ("+e.data("ru/shortMonth")+")","gi");return n.replace(r,"$1\xa0$2")}}),e.rule({name:"ru/nbsp/groupNumbers",handler:function(e){return e.replace(/(^ ?|\D )(\d{1,3}([ \u00A0\u202F\u2009]\d{3})+)(?! ?[\d-])/gm,function(e,n,r){return n+r.replace(/\s/g,"\u202f")})}}),e.rule({name:"ru/nbsp/m",index:"+5",handler:function(n){var r=e._privateLabel,a=new RegExp("(^|[\\s,."+r+"])(\\d+)[ \xa0]?(\u043c\u043c?|\u0441\u043c|\u043a\u043c|\u0434\u043c|\u0433\u043c|mm?|km|cm|dm)([23\xb2\xb3])?([\\s.!?,;"+r+"]|$)","gm");return n.replace(a,function(e,n,r,a,t,u){var l={2:"\xb2","\xb2":"\xb2",3:"\xb3","\xb3":"\xb3","":""}[t||""];return n+r+"\xa0"+a+l+("\xa0"===u?" ":u)})}}),e.rule({name:"ru/nbsp/ooo",handler:function(e){return e.replace(/(^|[^a-\u044f\u0451A-\u042f\u0401])(\u041e\u041e\u041e|\u041e\u0410\u041e|\u0417\u0410\u041e|\u041d\u0418\u0418|\u041f\u0411\u041e\u042e\u041b) /g,"$1$2\xa0")}}),e.rule({name:"ru/nbsp/page",handler:function(n){var r=new RegExp("(^|[)\\s"+e._privateLabel+"])(\u0441\u0442\u0440|\u0433\u043b|\u0440\u0438\u0441|\u0438\u043b\u043b?|\u0441\u0442|\u043f|c)\\. *(\\d+)([\\s.,?!;:]|$)","gim");return n.replace(r,"$1$2.\xa0$3$4")}}),e.rule({name:"ru/nbsp/ps",handler:function(n){var r=new RegExp("(^|\\s|"+e._privateLabel+")[p\u0437]\\.[ \xa0]?([p\u0437]\\.[ \xa0]?)?[s\u044b]\\.:? ","gim");return n.replace(r,function(e,n,r){return n+(r?"P.\xa0P.\xa0S. ":"P.\xa0S. ")})}}),e.rule({name:"ru/nbsp/rubleKopek",handler:function(e){return e.replace(/(\d) ?(?=(\u0440\u0443\u0431|\u043a\u043e\u043f)\.)/g,"$1\xa0")}}),e.rule({name:"ru/nbsp/see",handler:function(n){var r=new RegExp("(^|\\s|"+e._privateLabel+"|\\()(\u0441\u043c|\u0438\u043c)\\.[ \xa0]?([\u0430-\u044f\u04510-9a-z]+)([\\s.,?!]|$)","gi");return n.replace(r,function(e,n,r,a,t){return("\xa0"===n?" ":n)+r+".\xa0"+a+t})}}),e.rule({name:"ru/nbsp/year",handler:function(e){return e.replace(/(^|\D)(\d{4}) ?\u0433([ ,;.\n]|$)/g,"$1$2\xa0\u0433$3")}}),e.rule({name:"ru/nbsp/years",index:"+5",handler:function(n){var r=e.data("common/dash"),a=new RegExp("(^|\\D)(\\d{4})("+r+")(\\d{4})[ \xa0]?\u0433\\.?([ \xa0]?\u0433\\.)?","g");return n.replace(a,"$1$2$3$4\xa0\u0433\u0433.")}}),e.rule({name:"ru/number/ordinals",handler:function(e){var n=new RegExp("(\\d)-(\u044b\u0439|\u043e\u0439|\u0430\u044f|\u043e\u0435|\u044b\u0435|\u044b\u043c|\u043e\u043c|\u044b\u0445|\u043e\u0433\u043e|\u043e\u043c\u0443|\u044b\u043c\u0438)(?!["+this._data("l")+"])","g");return e.replace(n,function(e,n,r){var a={"\u043e\u0439":"\u0439","\u044b\u0439":"\u0439","\u0430\u044f":"\u044f","\u043e\u0435":"\u0435","\u044b\u0435":"\u0435","\u044b\u043c":"\u043c","\u043e\u043c":"\u043c","\u044b\u0445":"\u0445","\u043e\u0433\u043e":"\u0433\u043e","\u043e\u043c\u0443":"\u043c\u0443","\u044b\u043c\u0438":"\u043c\u0438"};return n+"-"+a[r]})}}),e.rule({name:"ru/optalign/bracket",handler:function(e,n){return e.replace(/( |\u00A0)\(/g,'<span class="typograf-oa-sp-lbracket">$1</span><span class="typograf-oa-lbracket">(</span>').replace(/^\(/gm,'<span class="typograf-oa-n-lbracket">(</span>')},disabled:!0}).innerRule({name:"ru/optalign/bracket",handler:function(e){return e.replace(/<span class="typograf-oa-(n-|sp-)?lbracket">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/optalign/comma",handler:function(e,n){var r=new RegExp("(["+this._data("l")+"\\d\u0301]+), ","gi");return e.replace(r,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0}).innerRule({name:"ru/optalign/comma",handler:function(e){return e.replace(/<span class="typograf-oa-comma(-sp)?">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/optalign/quote",handler:function(n){var r="ru/punctuation/quote",a='(["'+this.setting(r,"lquote")+this.setting(r,"lquote2")+this.setting(r,"lquote3")+"])",t=new RegExp("([\\d"+this._data("l")+"\\-\u0301!?.:;,]+)( |\xa0)("+a+")","gi"),u=new RegExp("(^|"+e._privateLabel+")"+a,"gm");return n.replace(t,'$1<span class="typograf-oa-sp-lquote">$2</span><span class="typograf-oa-lquote">$3</span>').replace(u,'$1<span class="typograf-oa-n-lquote">$2</span>')},disabled:!0}).innerRule({name:"ru/optalign/quote",handler:function(e){return e.replace(/<span class="typograf-oa-(n-|sp-)?lquote">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/other/accent",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])([\u0410\u0415\u0401\u0418\u041e\u0423\u042b\u042d\u042e\u042f])([^\u0410-\u042f\u0401\w]|$)/g,function(e,n,r,a){ | ||
return n+r.toLowerCase()+"\u0301"+a})},disabled:!0}),e.rule({name:"ru/punctuation/ano",handler:function(e){var n=new RegExp("([^!?,:;\\-\u2012\u2013\u2014])([ \xa0\n])(\u0430|\u043d\u043e)(?= |\xa0|\n)","g");return e.replace(n,"$1,$2$3")}}),e.rule({name:"ru/punctuation/apostrophe",index:"-5",handler:function(e){var n="(["+this._data("l")+"])",r=new RegExp(n+"['\u2019]"+n,"gi");return e.replace(r,"$1\u02bc$2")}}),e.rule({name:"ru/punctuation/exclamation",live:!1,handler:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/,"$1!!!$2")}}),e.rule({name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(e){var n=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(n,"$1?!$2")}}),e.rule({name:"ru/punctuation/hellip",handler:function(e){return e.replace(/(^|[^.])\.{3,4}([^.]|$)/g,"$1\u2026$2").replace(/(^|[^.])(\.\.\.|\u2026),/g,"$1\u2026").replace(/(\!|\?)(\.\.\.|\u2026)([^.]|$)/g,"$1..$3")}}),e.rule({name:"ru/punctuation/quote",handler:function(e,n){var r=n.lquote,a=n.rquote;return e=this._quote(e,n),r===n.lquote2&&a===n.rquote2?e.replace(new RegExp(r+r,"g"),r).replace(new RegExp(a+a,"g"),a):e},settings:{lquote:"\xab",rquote:"\xbb",lquote2:"\u201e",rquote2:"\u201c",lquote3:"\u201a",rquote3:"\u2018"}}),e.rule({name:"ru/space/afterHellip",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])(\.\.\.|\u2026)([\u0410-\u042f\u0401])/g,"$1$2 $3").replace(/([?!]\.\.)([\u0430-\u044f\u0451a-z])/gi,"$1 $2")}}),e.rule({name:"ru/space/year",handler:function(e){var n=new RegExp("(^| |\xa0)(\\d{3,4})(\u0433\u043e\u0434([\u0430\u0443\u0435]|\u043e\u043c)?)([^"+this._data("l")+"]|$)","g");return e.replace(n,"$1$2 $3$5")}}),e._sortRules(),e._needSortRules=!0,e}); |
@@ -212,8 +212,6 @@ Typograf.titles = { | ||
}, | ||
"ru/money/dollar": { | ||
"common": "$100 → 100 $" | ||
"ru/money/currency": { | ||
"en": "Currency symbol ($, €, ¥, Ұ, £ and ₤) after the number, $100 → 100 $", | ||
"ru": "Символ валюты ($, €, ¥, Ұ, £ и ₤) после числа, $100 → 100 $" | ||
}, | ||
"ru/money/euro": { | ||
"common": "€100 → 100 €" | ||
}, | ||
"ru/money/ruble": { | ||
@@ -246,2 +244,6 @@ "common": "1 руб. → 1 ₽" | ||
}, | ||
"ru/nbsp/groupNumbers": { | ||
"en": "Replacement space on a narrow non-breaking space in groups of numbers", | ||
"ru": "Замена пробела на неразрывный узкий пробелв группах чисел" | ||
}, | ||
"ru/nbsp/m": { | ||
@@ -263,2 +265,6 @@ "en": "m2 → м², m3 → м³ and non-breaking space", | ||
}, | ||
"ru/nbsp/rubleKopek": { | ||
"en": "Not once. space before the “rub” and “cop.”", | ||
"ru": "Нераз. пробел перед «руб.» и «коп.»" | ||
}, | ||
"ru/nbsp/see": { | ||
@@ -265,0 +271,0 @@ "en": "Non-breaking space after abbreviation «см.» and «им.»", |
@@ -212,8 +212,6 @@ { | ||
}, | ||
"ru/money/dollar": { | ||
"common": "$100 → 100 $" | ||
"ru/money/currency": { | ||
"en": "Currency symbol ($, €, ¥, Ұ, £ and ₤) after the number, $100 → 100 $", | ||
"ru": "Символ валюты ($, €, ¥, Ұ, £ и ₤) после числа, $100 → 100 $" | ||
}, | ||
"ru/money/euro": { | ||
"common": "€100 → 100 €" | ||
}, | ||
"ru/money/ruble": { | ||
@@ -246,2 +244,6 @@ "common": "1 руб. → 1 ₽" | ||
}, | ||
"ru/nbsp/groupNumbers": { | ||
"en": "Replacement space on a narrow non-breaking space in groups of numbers", | ||
"ru": "Замена пробела на неразрывный узкий пробелв группах чисел" | ||
}, | ||
"ru/nbsp/m": { | ||
@@ -263,2 +265,6 @@ "en": "m2 → м², m3 → м³ and non-breaking space", | ||
}, | ||
"ru/nbsp/rubleKopek": { | ||
"en": "Not once. space before the “rub” and “cop.”", | ||
"ru": "Нераз. пробел перед «руб.» и «коп.»" | ||
}, | ||
"ru/nbsp/see": { | ||
@@ -265,0 +271,0 @@ "en": "Non-breaking space after abbreviation «см.» and «им.»", |
@@ -29,6 +29,6 @@ ## Rules of typograf in order of execution | ||
| 24. | [ru/dash/month](../src/rules/ru/dash/month.js) | Dash between months | 310 | | ✓ | | ||
| 25. | [ru/dash/izza](../src/rules/ru/dash/izza.js) | Hyphen between “из-за” | 310 | | ✓ | | ||
| 25. | [ru/dash/kade](../src/rules/ru/dash/kade.js) | Hyphen before “ка, де, кась” | 310 | | ✓ | | ||
| 26. | [ru/dash/koe](../src/rules/ru/dash/koe.js) | Hyphen after “кое” and “кой” | 310 | | ✓ | | ||
| 27. | [ru/dash/years](../src/rules/ru/dash/years.js) | Hyphen to dash in years | 310 | | ✓ | | ||
| 28. | [ru/dash/kade](../src/rules/ru/dash/kade.js) | Hyphen before “ка, де, кась” | 310 | | ✓ | | ||
| 28. | [ru/dash/izza](../src/rules/ru/dash/izza.js) | Hyphen between “из-за” | 310 | | ✓ | | ||
| 29. | [ru/dash/izpod](../src/rules/ru/dash/izpod.js) | Hyphen between “из-под” | 310 | | ✓ | | ||
@@ -57,33 +57,34 @@ | 30. | [ru/dash/directSpeech](../src/rules/ru/dash/directSpeech.js) | Dash in direct speech | 310 | | ✓ | | ||
| 51. | [ru/nbsp/see](../src/rules/ru/nbsp/see.js) | Non-breaking space after abbreviation «см.» and «им.» | 510 | | ✓ | | ||
| 52. | [ru/nbsp/ps](../src/rules/ru/nbsp/ps.js) | Non-breaking space in P. S. and P. P. S. | 510 | | ✓ | | ||
| 53. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Non-breaking space after “стр.”, “гл.”, “рис.”, “илл.” | 510 | | ✓ | | ||
| 54. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Non-breaking space after “OOO, ОАО, ЗАО, НИИ, ПБОЮЛ” | 510 | | ✓ | | ||
| 55. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Non-breaking space between number and month | 510 | | ✓ | | ||
| 56. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Remove spaces and extra points in “вв.” | 510 | | ✓ | | ||
| 57. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Non-breaking thin space after № | 510 | | ✓ | | ||
| 58. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Non-breaking space in abbreviations, e.g. “т. д.” | 510 | | ✓ | | ||
| 59. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Placement of non-breaking space after “г.”, “обл.”, “ул.”, “пр.”, “кв.” et al. | 510 | | ✓ | | ||
| 60. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Non-breaking space before “ли”, “ль”, “же”, “бы”, “б” | 515 | | ✓ | | ||
| 61. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | m2 → м², m3 → м³ and non-breaking space | 515 | | ✓ | | ||
| 62. | [ru/nbsp/years](../src/rules/ru/nbsp/years.js) | г.г. → гг. and non-breaking space | 515 | | ✓ | | ||
| 63. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 610 | | ✓ | | ||
| 64. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ | | ||
| 52. | [ru/nbsp/rubleKopek](../src/rules/ru/nbsp/rubleKopek.js) | Not once. space before the “rub” and “cop.” | 510 | | ✓ | | ||
| 53. | [ru/nbsp/ps](../src/rules/ru/nbsp/ps.js) | Non-breaking space in P. S. and P. P. S. | 510 | | ✓ | | ||
| 54. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Non-breaking space after “стр.”, “гл.”, “рис.”, “илл.” | 510 | | ✓ | | ||
| 55. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Non-breaking space after “OOO, ОАО, ЗАО, НИИ, ПБОЮЛ” | 510 | | ✓ | | ||
| 56. | [ru/nbsp/groupNumbers](../src/rules/ru/nbsp/groupNumbers.js) | Replacement space on a narrow non-breaking space in groups of numbers | 510 | | ✓ | | ||
| 57. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Non-breaking space in abbreviations, e.g. “т. д.” | 510 | | ✓ | | ||
| 58. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Placement of non-breaking space after “г.”, “обл.”, “ул.”, “пр.”, “кв.” et al. | 510 | | ✓ | | ||
| 59. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Non-breaking thin space after № | 510 | | ✓ | | ||
| 60. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Non-breaking space between number and month | 510 | | ✓ | | ||
| 61. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Remove spaces and extra points in “вв.” | 510 | | ✓ | | ||
| 62. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Non-breaking space before “ли”, “ль”, “же”, “бы”, “б” | 515 | | ✓ | | ||
| 63. | [ru/nbsp/years](../src/rules/ru/nbsp/years.js) | г.г. → гг. and non-breaking space | 515 | | ✓ | | ||
| 64. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | m2 → м², m3 → м³ and non-breaking space | 515 | | ✓ | | ||
| 65. | [common/number/fraction](../src/rules/common/number/fraction.js) | 1/2 → ½, 1/4 → ¼, 3/3 → ¾ | 610 | | ✓ | | ||
| 66. | [common/number/mathSigns](../src/rules/common/number/mathSigns.js) | != → ≠, <= → ≤, >= → ≥, ~= → ≅, +- → ± | 610 | | ✓ | | ||
| 67. | [ru/money/euro](../src/rules/ru/money/euro.js) | €100 → 100 € | 710 | | ✓ | | ||
| 68. | [ru/money/dollar](../src/rules/ru/money/dollar.js) | $100 → 100 $ | 710 | | ✓ | | ||
| 69. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | | | ||
| 70. | [ru/date/fromISO](../src/rules/ru/date/fromISO.js) | Converting dates YYYY-MM-DD type DD.MM.YYYY | 810 | | ✓ | | ||
| 71. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 810 | | ✓ | | ||
| 72. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Removing repeat words | 910 | | | | ||
| 73. | [ru/other/accent](../src/rules/ru/other/accent.js) | Replacement capital letters to lowercase with addition of accent | 910 | | | | ||
| 74. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | for opening quotation marks | 1010 | | | | ||
| 75. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | for opening bracket | 1010 | | | | ||
| 76. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | for comma | 1010 | | | | ||
| 77. | [common/html/url](../src/rules/common/html/url.js) | Placement of links | 1110 | | | | ||
| 78. | [common/html/e-mail](../src/rules/common/html/e-mail.js) | Placement of links for e-mail | 1110 | | | | ||
| 79. | [common/nbsp/nowrap](../src/rules/common/nbsp/nowrap.js) | Replace non-breaking space to normal space in tags nowrap and nobr | 510 | end | ✓ | | ||
| 80. | [common/html/pbr](../src/rules/common/html/pbr.js) | Placement of p and br tags | 1110 | end | | | ||
| 81. | [common/html/nbr](../src/rules/common/html/nbr.js) | Replacement line break on <br/> | 1115 | end | | | ||
| 82. | [common/html/stripTags](../src/rules/common/html/stripTags.js) | Removing HTML-tags | 1209 | end | | | ||
| 83. | [common/html/escape](../src/rules/common/html/escape.js) | Escaping HTML | 1210 | end | | | ||
| 67. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ | | ||
| 68. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 610 | | ✓ | | ||
| 69. | [ru/money/currency](../src/rules/ru/money/currency.js) | Currency symbol ($, €, ¥, Ұ, £ and ₤) after the number, $100 → 100 $ | 710 | | ✓ | | ||
| 70. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | | | ||
| 71. | [ru/date/fromISO](../src/rules/ru/date/fromISO.js) | Converting dates YYYY-MM-DD type DD.MM.YYYY | 810 | | ✓ | | ||
| 72. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 810 | | ✓ | | ||
| 73. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Removing repeat words | 910 | | | | ||
| 74. | [ru/other/accent](../src/rules/ru/other/accent.js) | Replacement capital letters to lowercase with addition of accent | 910 | | | | ||
| 75. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | for opening quotation marks | 1010 | | | | ||
| 76. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | for opening bracket | 1010 | | | | ||
| 77. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | for comma | 1010 | | | | ||
| 78. | [common/html/url](../src/rules/common/html/url.js) | Placement of links | 1110 | | | | ||
| 79. | [common/html/e-mail](../src/rules/common/html/e-mail.js) | Placement of links for e-mail | 1110 | | | | ||
| 80. | [common/nbsp/nowrap](../src/rules/common/nbsp/nowrap.js) | Replace non-breaking space to normal space in tags nowrap and nobr | 510 | end | ✓ | | ||
| 81. | [common/html/pbr](../src/rules/common/html/pbr.js) | Placement of p and br tags | 1110 | end | | | ||
| 82. | [common/html/nbr](../src/rules/common/html/nbr.js) | Replacement line break on <br/> | 1115 | end | | | ||
| 83. | [common/html/stripTags](../src/rules/common/html/stripTags.js) | Removing HTML-tags | 1209 | end | | | ||
| 84. | [common/html/escape](../src/rules/common/html/escape.js) | Escaping HTML | 1210 | end | | |
@@ -29,6 +29,6 @@ ## Правила типографа по порядку выполнения | ||
| 24. | [ru/dash/month](../src/rules/ru/dash/month.js) | Тире между месяцами | 310 | | ✓ | | ||
| 25. | [ru/dash/izza](../src/rules/ru/dash/izza.js) | Дефис между «из-за» | 310 | | ✓ | | ||
| 25. | [ru/dash/kade](../src/rules/ru/dash/kade.js) | Дефис перед «ка», «де», «кась» | 310 | | ✓ | | ||
| 26. | [ru/dash/koe](../src/rules/ru/dash/koe.js) | Дефис после «кое» и «кой» | 310 | | ✓ | | ||
| 27. | [ru/dash/years](../src/rules/ru/dash/years.js) | Замена дефиса на тире в годах | 310 | | ✓ | | ||
| 28. | [ru/dash/kade](../src/rules/ru/dash/kade.js) | Дефис перед «ка», «де», «кась» | 310 | | ✓ | | ||
| 28. | [ru/dash/izza](../src/rules/ru/dash/izza.js) | Дефис между «из-за» | 310 | | ✓ | | ||
| 29. | [ru/dash/izpod](../src/rules/ru/dash/izpod.js) | Дефис между «из-под» | 310 | | ✓ | | ||
@@ -57,33 +57,34 @@ | 30. | [ru/dash/directSpeech](../src/rules/ru/dash/directSpeech.js) | Тире в прямой речи | 310 | | ✓ | | ||
| 51. | [ru/nbsp/see](../src/rules/ru/nbsp/see.js) | Нераз. пробел после сокращений «см.» и «им.» | 510 | | ✓ | | ||
| 52. | [ru/nbsp/ps](../src/rules/ru/nbsp/ps.js) | Нераз. пробел в P. S. и P. P. S. | 510 | | ✓ | | ||
| 53. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Нераз. пробел после «стр.», «гл.», «рис.», «илл.» | 510 | | ✓ | | ||
| 54. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Нераз. пробел после OOO, ОАО, ЗАО, НИИ и ПБОЮЛ | 510 | | ✓ | | ||
| 55. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Нераз. пробел между числом и месяцем | 510 | | ✓ | | ||
| 56. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Удаление пробелов и лишних точек в «вв.» | 510 | | ✓ | | ||
| 57. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Нераз. узкий пробел после № | 510 | | ✓ | | ||
| 58. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Нераз. пробел в сокращениях, например, в “т. д.” | 510 | | ✓ | | ||
| 59. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Расстановка неразрывного пробела после «г.», «обл.», «ул.», «пр.», «кв.» и др. | 510 | | ✓ | | ||
| 60. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Нераз. пробел перед «ли», «ль», «же», «бы», «б» | 515 | | ✓ | | ||
| 61. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | м2 → м², м3 → м³ и нераз. пробел | 515 | | ✓ | | ||
| 62. | [ru/nbsp/years](../src/rules/ru/nbsp/years.js) | г.г. → гг. и нераз. пробел | 515 | | ✓ | | ||
| 63. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 610 | | ✓ | | ||
| 64. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ | | ||
| 52. | [ru/nbsp/rubleKopek](../src/rules/ru/nbsp/rubleKopek.js) | Нераз. пробел перед «руб.» и «коп.» | 510 | | ✓ | | ||
| 53. | [ru/nbsp/ps](../src/rules/ru/nbsp/ps.js) | Нераз. пробел в P. S. и P. P. S. | 510 | | ✓ | | ||
| 54. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Нераз. пробел после «стр.», «гл.», «рис.», «илл.» | 510 | | ✓ | | ||
| 55. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Нераз. пробел после OOO, ОАО, ЗАО, НИИ и ПБОЮЛ | 510 | | ✓ | | ||
| 56. | [ru/nbsp/groupNumbers](../src/rules/ru/nbsp/groupNumbers.js) | Замена пробела на неразрывный узкий пробелв группах чисел | 510 | | ✓ | | ||
| 57. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Нераз. пробел в сокращениях, например, в “т. д.” | 510 | | ✓ | | ||
| 58. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Расстановка неразрывного пробела после «г.», «обл.», «ул.», «пр.», «кв.» и др. | 510 | | ✓ | | ||
| 59. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Нераз. узкий пробел после № | 510 | | ✓ | | ||
| 60. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Нераз. пробел между числом и месяцем | 510 | | ✓ | | ||
| 61. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Удаление пробелов и лишних точек в «вв.» | 510 | | ✓ | | ||
| 62. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Нераз. пробел перед «ли», «ль», «же», «бы», «б» | 515 | | ✓ | | ||
| 63. | [ru/nbsp/years](../src/rules/ru/nbsp/years.js) | г.г. → гг. и нераз. пробел | 515 | | ✓ | | ||
| 64. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | м2 → м², м3 → м³ и нераз. пробел | 515 | | ✓ | | ||
| 65. | [common/number/fraction](../src/rules/common/number/fraction.js) | 1/2 → ½, 1/4 → ¼, 3/3 → ¾ | 610 | | ✓ | | ||
| 66. | [common/number/mathSigns](../src/rules/common/number/mathSigns.js) | != → ≠, <= → ≤, >= → ≥, ~= → ≅, +- → ± | 610 | | ✓ | | ||
| 67. | [ru/money/euro](../src/rules/ru/money/euro.js) | €100 → 100 € | 710 | | ✓ | | ||
| 68. | [ru/money/dollar](../src/rules/ru/money/dollar.js) | $100 → 100 $ | 710 | | ✓ | | ||
| 69. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | | | ||
| 70. | [ru/date/fromISO](../src/rules/ru/date/fromISO.js) | Преобразование дат YYYY-MM-DD к виду DD.MM.YYYY | 810 | | ✓ | | ||
| 71. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 810 | | ✓ | | ||
| 72. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Удаление повтора слова | 910 | | | | ||
| 73. | [ru/other/accent](../src/rules/ru/other/accent.js) | Замена заглавной буквы на строчную с добавлением ударения | 910 | | | | ||
| 74. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | для открывающей кавычки | 1010 | | | | ||
| 75. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | для открывающей скобки | 1010 | | | | ||
| 76. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | для запятой | 1010 | | | | ||
| 77. | [common/html/url](../src/rules/common/html/url.js) | Расстановка ссылок | 1110 | | | | ||
| 78. | [common/html/e-mail](../src/rules/common/html/e-mail.js) | Расстановка ссылок для эл. почты | 1110 | | | | ||
| 79. | [common/nbsp/nowrap](../src/rules/common/nbsp/nowrap.js) | Заменять нераз. пробел на обычный пробел в тегах nowrap и nobr | 510 | end | ✓ | | ||
| 80. | [common/html/pbr](../src/rules/common/html/pbr.js) | Расстановка тегов p и br | 1110 | end | | | ||
| 81. | [common/html/nbr](../src/rules/common/html/nbr.js) | Замена перевода строки на <br/> | 1115 | end | | | ||
| 82. | [common/html/stripTags](../src/rules/common/html/stripTags.js) | Удаление HTML-тегов | 1209 | end | | | ||
| 83. | [common/html/escape](../src/rules/common/html/escape.js) | Экранирование HTML | 1210 | end | | | ||
| 67. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ | | ||
| 68. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 610 | | ✓ | | ||
| 69. | [ru/money/currency](../src/rules/ru/money/currency.js) | Символ валюты ($, €, ¥, Ұ, £ и ₤) после числа, $100 → 100 $ | 710 | | ✓ | | ||
| 70. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | | | ||
| 71. | [ru/date/fromISO](../src/rules/ru/date/fromISO.js) | Преобразование дат YYYY-MM-DD к виду DD.MM.YYYY | 810 | | ✓ | | ||
| 72. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 810 | | ✓ | | ||
| 73. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Удаление повтора слова | 910 | | | | ||
| 74. | [ru/other/accent](../src/rules/ru/other/accent.js) | Замена заглавной буквы на строчную с добавлением ударения | 910 | | | | ||
| 75. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | для открывающей кавычки | 1010 | | | | ||
| 76. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | для открывающей скобки | 1010 | | | | ||
| 77. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | для запятой | 1010 | | | | ||
| 78. | [common/html/url](../src/rules/common/html/url.js) | Расстановка ссылок | 1110 | | | | ||
| 79. | [common/html/e-mail](../src/rules/common/html/e-mail.js) | Расстановка ссылок для эл. почты | 1110 | | | | ||
| 80. | [common/nbsp/nowrap](../src/rules/common/nbsp/nowrap.js) | Заменять нераз. пробел на обычный пробел в тегах nowrap и nobr | 510 | end | ✓ | | ||
| 81. | [common/html/pbr](../src/rules/common/html/pbr.js) | Расстановка тегов p и br | 1110 | end | | | ||
| 82. | [common/html/nbr](../src/rules/common/html/nbr.js) | Замена перевода строки на <br/> | 1115 | end | | | ||
| 83. | [common/html/stripTags](../src/rules/common/html/stripTags.js) | Удаление HTML-тегов | 1209 | end | | | ||
| 84. | [common/html/escape](../src/rules/common/html/escape.js) | Экранирование HTML | 1210 | end | | |
@@ -59,11 +59,11 @@ ## Rules of typograf | ||
| 54. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 810 | | ✓ | | ||
| 55. | [ru/money/dollar](../src/rules/ru/money/dollar.js) | $100 → 100 $ | 710 | | ✓ | | ||
| 56. | [ru/money/euro](../src/rules/ru/money/euro.js) | €100 → 100 € | 710 | | ✓ | | ||
| 57. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | | | ||
| 58. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Non-breaking space in abbreviations, e.g. “т. д.” | 510 | | ✓ | | ||
| 59. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Placement of non-breaking space after “г.”, “обл.”, “ул.”, “пр.”, “кв.” et al. | 510 | | ✓ | | ||
| 60. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Non-breaking thin space after № | 510 | | ✓ | | ||
| 61. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Non-breaking space before “ли”, “ль”, “же”, “бы”, “б” | 515 | | ✓ | | ||
| 62. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Remove spaces and extra points in “вв.” | 510 | | ✓ | | ||
| 63. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Non-breaking space between number and month | 510 | | ✓ | | ||
| 55. | [ru/money/currency](../src/rules/ru/money/currency.js) | Currency symbol ($, €, ¥, Ұ, £ and ₤) after the number, $100 → 100 $ | 710 | | ✓ | | ||
| 56. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | | | ||
| 57. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Non-breaking space in abbreviations, e.g. “т. д.” | 510 | | ✓ | | ||
| 58. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Placement of non-breaking space after “г.”, “обл.”, “ул.”, “пр.”, “кв.” et al. | 510 | | ✓ | | ||
| 59. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Non-breaking thin space after № | 510 | | ✓ | | ||
| 60. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Non-breaking space before “ли”, “ль”, “же”, “бы”, “б” | 515 | | ✓ | | ||
| 61. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Remove spaces and extra points in “вв.” | 510 | | ✓ | | ||
| 62. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Non-breaking space between number and month | 510 | | ✓ | | ||
| 63. | [ru/nbsp/groupNumbers](../src/rules/ru/nbsp/groupNumbers.js) | Replacement space on a narrow non-breaking space in groups of numbers | 510 | | ✓ | | ||
| 64. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | m2 → м², m3 → м³ and non-breaking space | 515 | | ✓ | | ||
@@ -73,17 +73,18 @@ | 65. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Non-breaking space after “OOO, ОАО, ЗАО, НИИ, ПБОЮЛ” | 510 | | ✓ | | ||
| 67. | [ru/nbsp/ps](../src/rules/ru/nbsp/ps.js) | Non-breaking space in P. S. and P. P. S. | 510 | | ✓ | | ||
| 68. | [ru/nbsp/see](../src/rules/ru/nbsp/see.js) | Non-breaking space after abbreviation «см.» and «им.» | 510 | | ✓ | | ||
| 69. | [ru/nbsp/year](../src/rules/ru/nbsp/year.js) | Non-breaking space before XXXX г. (2012 г.) | 510 | | ✓ | | ||
| 70. | [ru/nbsp/years](../src/rules/ru/nbsp/years.js) | г.г. → гг. and non-breaking space | 515 | | ✓ | | ||
| 71. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ | | ||
| 72. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | for opening bracket | 1010 | | | | ||
| 73. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | for comma | 1010 | | | | ||
| 74. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | for opening quotation marks | 1010 | | | | ||
| 75. | [ru/other/accent](../src/rules/ru/other/accent.js) | Replacement capital letters to lowercase with addition of accent | 910 | | | | ||
| 76. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Placement of commas before “а” and “но” | 410 | | ✓ | | ||
| 77. | [ru/punctuation/apostrophe](../src/rules/ru/punctuation/apostrophe.js) | Placement of correct apostrophe | 405 | | ✓ | | ||
| 78. | [ru/punctuation/exclamation](../src/rules/ru/punctuation/exclamation.js) | !! → ! | 410 | | ✓ | | ||
| 79. | [ru/punctuation/exclamationQuestion](../src/rules/ru/punctuation/exclamationQuestion.js) | !? → ?! | 415 | | ✓ | | ||
| 80. | [ru/punctuation/hellip](../src/rules/ru/punctuation/hellip.js) | Three points on ellipsis | 410 | | ✓ | | ||
| 81. | [ru/punctuation/quote](../src/rules/ru/punctuation/quote.js) | Placement of quotation marks | 410 | | ✓ | | ||
| 82. | [ru/space/afterHellip](../src/rules/ru/space/afterHellip.js) | Space after ..., !.. and ?.. | 210 | | ✓ | | ||
| 83. | [ru/space/year](../src/rules/ru/space/year.js) | Space between number and word “год” | 210 | | ✓ | | ||
| 68. | [ru/nbsp/rubleKopek](../src/rules/ru/nbsp/rubleKopek.js) | Not once. space before the “rub” and “cop.” | 510 | | ✓ | | ||
| 69. | [ru/nbsp/see](../src/rules/ru/nbsp/see.js) | Non-breaking space after abbreviation «см.» and «им.» | 510 | | ✓ | | ||
| 70. | [ru/nbsp/year](../src/rules/ru/nbsp/year.js) | Non-breaking space before XXXX г. (2012 г.) | 510 | | ✓ | | ||
| 71. | [ru/nbsp/years](../src/rules/ru/nbsp/years.js) | г.г. → гг. and non-breaking space | 515 | | ✓ | | ||
| 72. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ | | ||
| 73. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | for opening bracket | 1010 | | | | ||
| 74. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | for comma | 1010 | | | | ||
| 75. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | for opening quotation marks | 1010 | | | | ||
| 76. | [ru/other/accent](../src/rules/ru/other/accent.js) | Replacement capital letters to lowercase with addition of accent | 910 | | | | ||
| 77. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Placement of commas before “а” and “но” | 410 | | ✓ | | ||
| 78. | [ru/punctuation/apostrophe](../src/rules/ru/punctuation/apostrophe.js) | Placement of correct apostrophe | 405 | | ✓ | | ||
| 79. | [ru/punctuation/exclamation](../src/rules/ru/punctuation/exclamation.js) | !! → ! | 410 | | ✓ | | ||
| 80. | [ru/punctuation/exclamationQuestion](../src/rules/ru/punctuation/exclamationQuestion.js) | !? → ?! | 415 | | ✓ | | ||
| 81. | [ru/punctuation/hellip](../src/rules/ru/punctuation/hellip.js) | Three points on ellipsis | 410 | | ✓ | | ||
| 82. | [ru/punctuation/quote](../src/rules/ru/punctuation/quote.js) | Placement of quotation marks | 410 | | ✓ | | ||
| 83. | [ru/space/afterHellip](../src/rules/ru/space/afterHellip.js) | Space after ..., !.. and ?.. | 210 | | ✓ | | ||
| 84. | [ru/space/year](../src/rules/ru/space/year.js) | Space between number and word “год” | 210 | | ✓ | |
@@ -59,11 +59,11 @@ ## Правила типографа | ||
| 54. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 810 | | ✓ | | ||
| 55. | [ru/money/dollar](../src/rules/ru/money/dollar.js) | $100 → 100 $ | 710 | | ✓ | | ||
| 56. | [ru/money/euro](../src/rules/ru/money/euro.js) | €100 → 100 € | 710 | | ✓ | | ||
| 57. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | | | ||
| 58. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Нераз. пробел в сокращениях, например, в “т. д.” | 510 | | ✓ | | ||
| 59. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Расстановка неразрывного пробела после «г.», «обл.», «ул.», «пр.», «кв.» и др. | 510 | | ✓ | | ||
| 60. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Нераз. узкий пробел после № | 510 | | ✓ | | ||
| 61. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Нераз. пробел перед «ли», «ль», «же», «бы», «б» | 515 | | ✓ | | ||
| 62. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Удаление пробелов и лишних точек в «вв.» | 510 | | ✓ | | ||
| 63. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Нераз. пробел между числом и месяцем | 510 | | ✓ | | ||
| 55. | [ru/money/currency](../src/rules/ru/money/currency.js) | Символ валюты ($, €, ¥, Ұ, £ и ₤) после числа, $100 → 100 $ | 710 | | ✓ | | ||
| 56. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | | | ||
| 57. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Нераз. пробел в сокращениях, например, в “т. д.” | 510 | | ✓ | | ||
| 58. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Расстановка неразрывного пробела после «г.», «обл.», «ул.», «пр.», «кв.» и др. | 510 | | ✓ | | ||
| 59. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Нераз. узкий пробел после № | 510 | | ✓ | | ||
| 60. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Нераз. пробел перед «ли», «ль», «же», «бы», «б» | 515 | | ✓ | | ||
| 61. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Удаление пробелов и лишних точек в «вв.» | 510 | | ✓ | | ||
| 62. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Нераз. пробел между числом и месяцем | 510 | | ✓ | | ||
| 63. | [ru/nbsp/groupNumbers](../src/rules/ru/nbsp/groupNumbers.js) | Замена пробела на неразрывный узкий пробелв группах чисел | 510 | | ✓ | | ||
| 64. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | м2 → м², м3 → м³ и нераз. пробел | 515 | | ✓ | | ||
@@ -73,17 +73,18 @@ | 65. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Нераз. пробел после OOO, ОАО, ЗАО, НИИ и ПБОЮЛ | 510 | | ✓ | | ||
| 67. | [ru/nbsp/ps](../src/rules/ru/nbsp/ps.js) | Нераз. пробел в P. S. и P. P. S. | 510 | | ✓ | | ||
| 68. | [ru/nbsp/see](../src/rules/ru/nbsp/see.js) | Нераз. пробел после сокращений «см.» и «им.» | 510 | | ✓ | | ||
| 69. | [ru/nbsp/year](../src/rules/ru/nbsp/year.js) | Нераз. пробел после XXXX г. (2012 г.) | 510 | | ✓ | | ||
| 70. | [ru/nbsp/years](../src/rules/ru/nbsp/years.js) | г.г. → гг. и нераз. пробел | 515 | | ✓ | | ||
| 71. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ | | ||
| 72. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | для открывающей скобки | 1010 | | | | ||
| 73. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | для запятой | 1010 | | | | ||
| 74. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | для открывающей кавычки | 1010 | | | | ||
| 75. | [ru/other/accent](../src/rules/ru/other/accent.js) | Замена заглавной буквы на строчную с добавлением ударения | 910 | | | | ||
| 76. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Расстановка запятых перед «а» и «но» | 410 | | ✓ | | ||
| 77. | [ru/punctuation/apostrophe](../src/rules/ru/punctuation/apostrophe.js) | Расстановка правильного апострофа | 405 | | ✓ | | ||
| 78. | [ru/punctuation/exclamation](../src/rules/ru/punctuation/exclamation.js) | !! → ! | 410 | | ✓ | | ||
| 79. | [ru/punctuation/exclamationQuestion](../src/rules/ru/punctuation/exclamationQuestion.js) | !? → ?! | 415 | | ✓ | | ||
| 80. | [ru/punctuation/hellip](../src/rules/ru/punctuation/hellip.js) | Три точки на многоточие, ?... → ?.. и пр. | 410 | | ✓ | | ||
| 81. | [ru/punctuation/quote](../src/rules/ru/punctuation/quote.js) | Расстановка кавычек | 410 | | ✓ | | ||
| 82. | [ru/space/afterHellip](../src/rules/ru/space/afterHellip.js) | Пробел после ..., !.. и ?.. | 210 | | ✓ | | ||
| 83. | [ru/space/year](../src/rules/ru/space/year.js) | Пробел между числом и словом «год» | 210 | | ✓ | | ||
| 68. | [ru/nbsp/rubleKopek](../src/rules/ru/nbsp/rubleKopek.js) | Нераз. пробел перед «руб.» и «коп.» | 510 | | ✓ | | ||
| 69. | [ru/nbsp/see](../src/rules/ru/nbsp/see.js) | Нераз. пробел после сокращений «см.» и «им.» | 510 | | ✓ | | ||
| 70. | [ru/nbsp/year](../src/rules/ru/nbsp/year.js) | Нераз. пробел после XXXX г. (2012 г.) | 510 | | ✓ | | ||
| 71. | [ru/nbsp/years](../src/rules/ru/nbsp/years.js) | г.г. → гг. и нераз. пробел | 515 | | ✓ | | ||
| 72. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ | | ||
| 73. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | для открывающей скобки | 1010 | | | | ||
| 74. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | для запятой | 1010 | | | | ||
| 75. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | для открывающей кавычки | 1010 | | | | ||
| 76. | [ru/other/accent](../src/rules/ru/other/accent.js) | Замена заглавной буквы на строчную с добавлением ударения | 910 | | | | ||
| 77. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Расстановка запятых перед «а» и «но» | 410 | | ✓ | | ||
| 78. | [ru/punctuation/apostrophe](../src/rules/ru/punctuation/apostrophe.js) | Расстановка правильного апострофа | 405 | | ✓ | | ||
| 79. | [ru/punctuation/exclamation](../src/rules/ru/punctuation/exclamation.js) | !! → ! | 410 | | ✓ | | ||
| 80. | [ru/punctuation/exclamationQuestion](../src/rules/ru/punctuation/exclamationQuestion.js) | !? → ?! | 415 | | ✓ | | ||
| 81. | [ru/punctuation/hellip](../src/rules/ru/punctuation/hellip.js) | Три точки на многоточие, ?... → ?.. и пр. | 410 | | ✓ | | ||
| 82. | [ru/punctuation/quote](../src/rules/ru/punctuation/quote.js) | Расстановка кавычек | 410 | | ✓ | | ||
| 83. | [ru/space/afterHellip](../src/rules/ru/space/afterHellip.js) | Пробел после ..., !.. и ?.. | 210 | | ✓ | | ||
| 84. | [ru/space/year](../src/rules/ru/space/year.js) | Пробел между числом и словом «год» | 210 | | ✓ | |
{ | ||
"name": "typograf", | ||
"description": "The client and server typographer", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"author": { | ||
@@ -34,3 +34,3 @@ "name": "Denis Seleznev", | ||
"devDependencies": { | ||
"chai": "~3.3.0", | ||
"chai": "~3.4.1", | ||
"gulp": "~3.9.0", | ||
@@ -40,3 +40,3 @@ "gulp-concat": "~2.6.0", | ||
"gulp-jscs": "~3.0.1", | ||
"gulp-jshint": "~1.11.2", | ||
"gulp-jshint": "~1.12.0", | ||
"gulp-jsonlint": "^1.0.2", | ||
@@ -47,4 +47,4 @@ "gulp-rename": "~1.2.0", | ||
"gulp-util": "~3.0.2", | ||
"istanbul": "~0.3.5", | ||
"jscs": "~2.2.1", | ||
"istanbul": "~0.4.0", | ||
"jscs": "~2.5.1", | ||
"jshint": "~2.8.0", | ||
@@ -51,0 +51,0 @@ "mocha": "~2.3.3", |
@@ -157,4 +157,5 @@ Типограф на JavaScript | ||
## Ссылки | ||
+ [Типограф для Mozilla Firefox](https://addons.mozilla.org/ru/firefox/addon/typografy/) | ||
+ [Букмарклет для типографа](https://github.com/typograf/bookmarklet) | ||
+ [Средство поиска опечаток в текстах](https://github.com/hcodes/yaspeller) | ||
+ [Восстановление буквы «ё» в русских текстах](https://github.com/hcodes/eyo) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
180433
2690
161