Comparing version 2.11.0 to 2.11.1
@@ -114,9 +114,14 @@ /*! Typograf | © 2015 Denis Seleznev | https://github.com/typograf/typograf/ */ | ||
rquot2 = settings.rquot2, | ||
phrase = '[' + letters + ')!?.:;#*,' + ']*?', | ||
reL = new RegExp('[«„“"]' + '([…' + letters + '])', 'gi'), | ||
reR = new RegExp('(' + phrase + ')' + '[»”“"]' + '(' + phrase + ')', 'gi'), | ||
openingQuotes = '[«„“"]', | ||
closingQuotes = '[»”“"]', | ||
quotes = '[«»„“”"]', | ||
phrase = '[' + letters + ')!?.:;#*,]*?', | ||
reL = new RegExp(openingQuotes + '([…' + letters + '])', 'gi'), | ||
reR = new RegExp('(' + phrase + ')' + closingQuotes + '(' + phrase + ')', 'gi'), | ||
reL1 = new RegExp(rquot2 + '([^' + lquot2 + rquot2 + ']*?)' + rquot2, 'g'), | ||
reR1 = new RegExp(lquot2 + '([^' + lquot2 + rquot2 + ']*?)' + lquot2, 'g'), | ||
reL2 = new RegExp(lquot2, 'g'), | ||
reR2 = new RegExp(rquot2, 'g'); | ||
reR2 = new RegExp(rquot2, 'g'), | ||
reOpeningTag = new RegExp('(^|\\s)' + quotes + '\uDBFF', 'g'), | ||
reClosingTag = new RegExp('\uDBFF' + quotes + '([\s!?.:;#*,]|$)', 'g'); | ||
@@ -126,2 +131,4 @@ text = text | ||
.replace(reR, '$1' + rquot2 + '$2') // Closing quote | ||
.replace(reOpeningTag, '$1' + lquot2 + '\uDBFF') | ||
.replace(reClosingTag, '\uDBFF' + rquot2 + '$1') | ||
.replace(new RegExp('(^|\\w|\\s)' + rquot2 + lquot2, 'g'), | ||
@@ -210,6 +217,7 @@ '$1' + lquot2 + lquot2); // Fixed for the case »« at the beginning of the text | ||
this._isHTML = text.search(/<[a-z!]/i) !== -1; | ||
executeRulesForQueue('start'); | ||
var isHTML = text.search(/<[a-z!]/i) !== -1; | ||
if(isHTML) { | ||
if(this._isHTML) { | ||
text = this._hideSafeTags(text); | ||
@@ -222,3 +230,3 @@ } | ||
if(isHTML) { | ||
if(this._isHTML) { | ||
text = this._showSafeTags(text); | ||
@@ -230,2 +238,3 @@ } | ||
this._lang = null; | ||
this._isHTML = null; | ||
@@ -826,3 +835,4 @@ return text; | ||
name: 'common/html/nbr', | ||
sortIndex: 2020, | ||
sortIndex: 110, | ||
queue: 'start', | ||
func: function(text) { | ||
@@ -836,9 +846,12 @@ return text.search(/<br/) === -1 ? text.replace(/\n/g, '<br/>\n') : text; | ||
name: 'common/html/pbr', | ||
sortIndex: 2030, | ||
sortIndex: 90, | ||
queue: 'end', | ||
func: function(text) { | ||
if(text.search(/\n/) === -1) { | ||
text = '<p>' + text + '</p>'; | ||
} else { | ||
text = '<p>' + text.replace(/\n\n/g, '</p>\n<p>') + '<\/p>'; | ||
text = text.replace(/([^>])\n/g, '$1<br/>\n'); | ||
if(text.search(/<(p|br)[\s\/>]/) === -1) { | ||
if(text.search(/\n/) === -1) { | ||
text = '<p>' + text + '</p>'; | ||
} else { | ||
text = '<p>' + text.replace(/\n\n/g, '</p>\n<p>') + '<\/p>'; | ||
text = text.replace(/([^>])\n/g, '$1<br/>\n'); | ||
} | ||
} | ||
@@ -967,3 +980,4 @@ | ||
name: 'common/nbsp/nowrap', | ||
sortIndex: 1400, | ||
sortIndex: 100, | ||
queue: 'start', | ||
func: function(text) { | ||
@@ -1006,15 +1020,2 @@ return text | ||
Typograf.rule({ | ||
name: 'common/other/repeatWord', | ||
sortIndex: 1200, | ||
func: function(text) { | ||
var re = '([' + | ||
this.letters() + | ||
'\u0301]+) \\1([;:,.?! \n])'; | ||
return text.replace(new RegExp(re, 'gi'), '$1$2'); | ||
}, | ||
disabled: true | ||
}); | ||
Typograf.rule({ | ||
name: 'common/punctuation/delDoublePunctuation', | ||
@@ -1055,2 +1056,15 @@ sortIndex: 580, | ||
Typograf.rule({ | ||
name: 'common/other/repeatWord', | ||
sortIndex: 1200, | ||
func: function(text) { | ||
var re = '([' + | ||
this.letters() + | ||
'\u0301]+) \\1([;:,.?! \n])'; | ||
return text.replace(new RegExp(re, 'gi'), '$1$2'); | ||
}, | ||
disabled: true | ||
}); | ||
Typograf.rule({ | ||
name: 'common/space/afterPunctuation', | ||
@@ -1176,2 +1190,136 @@ sortIndex: 560, | ||
Typograf.rule({ | ||
name: 'en/punctuation/quot', | ||
sortIndex: 700, | ||
func: Typograf._quot, | ||
settings: { | ||
lquot: '“', | ||
rquot: '”', | ||
lquot2: '‘', | ||
rquot2: '’' | ||
} | ||
}); | ||
Typograf.data('ru/dash', { | ||
before: '(^| |\\n)', | ||
after: '( |,|\\.|\\?|:|!|$)' | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/izpod', | ||
sortIndex: 35, | ||
func: function(text) { | ||
var ruDash = this.data('ru/dash'), | ||
re = new RegExp(ruDash.before + '(И|и)з под' + ruDash.after, 'g'); | ||
return text.replace(re, '$1$2з-под$3'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/izza', | ||
sortIndex: 33, | ||
func: function(text) { | ||
var ruDash = this.data('ru/dash'), | ||
re = new RegExp(ruDash.before + '(И|и)з за' + ruDash.after, 'g'); | ||
return text.replace(re, '$1$2з-за$3'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/kade', | ||
sortIndex: 31, | ||
func: function(text) { | ||
var re = new RegExp('([a-яё]+)( | ?- ?)(ка|де|кась)' + this.data('ru/dash').after, 'g'); | ||
return text.replace(re, '$1-$3$4'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/koe', | ||
sortIndex: 38, | ||
func: function(text) { | ||
var ruDash = this.data('ru/dash'), | ||
re = new RegExp(ruDash.before + '([Кк]о[ей])\\s([а-яё]{3,})' + ruDash.after, 'g'); | ||
return text.replace(re, '$1$2-$3$4'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/main', | ||
sortIndex: 620, | ||
func: function(text) { | ||
var name = 'ru/dash/main', | ||
dashes = '(' + this.data('common/dash') + ')', | ||
reMain = new RegExp('( |\u00A0)' + dashes + '( |\\n)', 'g'), | ||
reDirect = new RegExp('(^|\n)' + dashes + '( |\u00A0)', 'g'), | ||
reInterval = new RegExp('(X|I|V)(?: |\u00A0)?' + dashes + '(?: |\u00A0)?(X|I|V)', 'g'); | ||
return text | ||
.replace(reMain, '\u00A0' + this.setting(name, 'dash') + '$3') | ||
.replace(reDirect, '$1' + this.setting(name, 'dash') + '\u00A0') | ||
.replace(reInterval, '$1' + this.setting(name, 'dashInterval') + '$3'); | ||
}, | ||
settings: { | ||
dash: '\u2014', // — | ||
dashInterval: '\u2014' // — | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/month', | ||
sortIndex: 610, | ||
func: function(text) { | ||
var part = '(' + this.data('ru/month').join('|') + ')', | ||
re = new RegExp(part + ' ?(' + this.data('common/dash') + ') ?' + part, 'gi'); | ||
return text.replace(re, '$1' + this.setting('ru/dash/main', 'dashInterval') + '$3'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/taki', | ||
sortIndex: 39, | ||
func: function(text) { | ||
var re = new RegExp('(верно|довольно|опять|прямо|так|вс[её]|действительно|неужели)\\s(таки)' + | ||
this.data('ru/dash').after, 'g'); | ||
return text.replace(re, '$1-$2$3'); | ||
} | ||
}); | ||
(function() { | ||
var words = [ | ||
'откуда', 'куда', 'где', | ||
'когда', 'зачем', 'почему', | ||
'как', 'како[ейм]', 'какая', 'каки[емх]', 'какими', 'какую', | ||
'что', 'чего', 'че[йм]', 'чьим?', | ||
'кто', 'кого', 'кому', 'кем' | ||
]; | ||
Typograf.rule({ | ||
name: 'ru/dash/to', | ||
sortIndex: 30, | ||
func: function(text) { | ||
var re = new RegExp('(' + words.join('|') + ')( | ?- ?)(то|либо|нибудь)' + this.data('ru/dash').after, 'gi'); | ||
return text.replace(re, '$1-$3$4'); | ||
} | ||
}); | ||
})(); | ||
Typograf.rule({ | ||
name: 'ru/dash/weekday', | ||
sortIndex: 600, | ||
func: function(text) { | ||
var part = '(' + this.data('ru/weekday').join('|') + ')', | ||
re = new RegExp(part + ' ?(' + this.data('common/dash') + ') ?' + part, 'gi'); | ||
return text.replace(re, '$1' + this.setting('ru/dash/main', 'dashInterval') + '$3'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/date/main', | ||
@@ -1359,125 +1507,3 @@ sortIndex: 1300, | ||
Typograf.data('ru/dash', { | ||
before: '(^| |\\n)', | ||
after: '( |,|\\.|\\?|:|!|$)' | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/izpod', | ||
sortIndex: 35, | ||
func: function(text) { | ||
var ruDash = this.data('ru/dash'), | ||
re = new RegExp(ruDash.before + '(И|и)з под' + ruDash.after, 'g'); | ||
return text.replace(re, '$1$2з-под$3'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/izza', | ||
sortIndex: 33, | ||
func: function(text) { | ||
var ruDash = this.data('ru/dash'), | ||
re = new RegExp(ruDash.before + '(И|и)з за' + ruDash.after, 'g'); | ||
return text.replace(re, '$1$2з-за$3'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/kade', | ||
sortIndex: 31, | ||
func: function(text) { | ||
var re = new RegExp('([a-яё]+)( | ?- ?)(ка|де|кась)' + this.data('ru/dash').after, 'g'); | ||
return text.replace(re, '$1-$3$4'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/koe', | ||
sortIndex: 38, | ||
func: function(text) { | ||
var ruDash = this.data('ru/dash'), | ||
re = new RegExp(ruDash.before + '([Кк]о[ей])\\s([а-яё]{3,})' + ruDash.after, 'g'); | ||
return text.replace(re, '$1$2-$3$4'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/main', | ||
sortIndex: 620, | ||
func: function(text) { | ||
var name = 'ru/dash/main', | ||
dashes = '(' + this.data('common/dash') + ')', | ||
reMain = new RegExp('( |\u00A0)' + dashes + '( |\\n)', 'g'), | ||
reDirect = new RegExp('(^|\n)' + dashes + '( |\u00A0)', 'g'), | ||
reInterval = new RegExp('(X|I|V)(?: |\u00A0)?' + dashes + '(?: |\u00A0)?(X|I|V)', 'g'); | ||
return text | ||
.replace(reMain, '\u00A0' + this.setting(name, 'dash') + '$3') | ||
.replace(reDirect, '$1' + this.setting(name, 'dash') + '\u00A0') | ||
.replace(reInterval, '$1' + this.setting(name, 'dashInterval') + '$3'); | ||
}, | ||
settings: { | ||
dash: '\u2014', // — | ||
dashInterval: '\u2014' // — | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/month', | ||
sortIndex: 610, | ||
func: function(text) { | ||
var part = '(' + this.data('ru/month').join('|') + ')', | ||
re = new RegExp(part + ' ?(' + this.data('common/dash') + ') ?' + part, 'gi'); | ||
return text.replace(re, '$1' + this.setting('ru/dash/main', 'dashInterval') + '$3'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/dash/taki', | ||
sortIndex: 39, | ||
func: function(text) { | ||
var re = new RegExp('(верно|довольно|опять|прямо|так|вс[её]|действительно|неужели)\\s(таки)' + | ||
this.data('ru/dash').after, 'g'); | ||
return text.replace(re, '$1-$2$3'); | ||
} | ||
}); | ||
(function() { | ||
var words = [ | ||
'откуда', 'куда', 'где', | ||
'когда', 'зачем', 'почему', | ||
'как', 'како[ейм]', 'какая', 'каки[емх]', 'какими', 'какую', | ||
'что', 'чего', 'че[йм]', 'чьим?', | ||
'кто', 'кого', 'кому', 'кем' | ||
]; | ||
Typograf.rule({ | ||
name: 'ru/dash/to', | ||
sortIndex: 30, | ||
func: function(text) { | ||
var re = new RegExp('(' + words.join('|') + ')( | ?- ?)(то|либо|нибудь)' + this.data('ru/dash').after, 'gi'); | ||
return text.replace(re, '$1-$3$4'); | ||
} | ||
}); | ||
})(); | ||
Typograf.rule({ | ||
name: 'ru/dash/weekday', | ||
sortIndex: 600, | ||
func: function(text) { | ||
var part = '(' + this.data('ru/weekday').join('|') + ')', | ||
re = new RegExp(part + ' ?(' + this.data('common/dash') + ') ?' + part, 'gi'); | ||
return text.replace(re, '$1' + this.setting('ru/dash/main', 'dashInterval') + '$3'); | ||
} | ||
}); | ||
Typograf.rule({ | ||
name: 'ru/number/ordinals', | ||
@@ -1584,14 +1610,2 @@ sortIndex: 1300, | ||
Typograf.rule({ | ||
name: 'en/punctuation/quot', | ||
sortIndex: 700, | ||
func: Typograf._quot, | ||
settings: { | ||
lquot: '“', | ||
rquot: '”', | ||
lquot2: '‘', | ||
rquot2: '’' | ||
} | ||
}); | ||
Typograf._sortRules(); | ||
@@ -1598,0 +1612,0 @@ Typograf._needSortRules = true; |
/*! 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._settings={},this._enabledRules={},this._replaceLabel=this._replaceLabel.bind(this),this._pasteLabel=this._pasteLabel.bind(this),this._initSafeTags(),this._rules.forEach(this._prepareRule,this)}return e.rule=function(n){return n.enabled=n.enabled===!1||n.disabled===!0?!1:!0,n._lang=n.name.split("/")[0],n.sortIndex=n.sortIndex||0,e.prototype._rules.push(n),e._needSortRules&&this._sortRules(),this},e.innerRule=function(n){return e.prototype._innerRules.push(n),n._lang=n.name.split("/")[0],n.sortIndex=n.sortIndex||0,e._needSortRules&&this._sortInnerRules(),this},e.data=function(n,r){e.prototype._data[n]=r},e._sortRules=function(){e.prototype._rules.sort(function(e,n){return e.sortIndex>n.sortIndex?1:-1})},e._sortInnerRules=function(){e.prototype._innerRules.sort(function(e,n){return e.sortIndex>n.sortIndex?1:-1})},e._quot=function(e,n){var r="\\d"+this.letters()+"\u0301",t=n.lquot,a=n.rquot,u=n.lquot2,o=n.rquot2,s="["+r+")!?.:;#*,]*?",c=new RegExp('[\xab\u201e\u201c"]([\u2026'+r+"])","gi"),i=new RegExp("("+s+')[\xbb\u201d\u201c"]('+s+")","gi"),l=new RegExp(o+"([^"+u+o+"]*?)"+o,"g"),p=new RegExp(u+"([^"+u+o+"]*?)"+u,"g"),d=new RegExp(u,"g"),f=new RegExp(o,"g");return e=e.replace(c,u+"$1").replace(i,"$1"+o+"$2").replace(new RegExp("(^|\\w|\\s)"+o+u,"g"),"$1"+u+u),t===u&&a===o?e=e.replace(d,t).replace(f,a).replace(new RegExp(t+t,"g"),t).replace(new RegExp(a+a,"g"),a):(e=e.replace(l,o+"$1"+a).replace(p,t+"$1"+u),-1===e.search(new RegExp(t+"|"+a))&&(e=e.replace(d,t).replace(f,a))),e},e._langs=["en","ru"],e.prototype={constructor:e,execute:function(e,n){n=n||{};var r=this,t=n.lang||this._prefs.lang||"common",a={},u={},o="undefined"==typeof n.mode?this._prefs.mode:n.mode,s=function(n){var r=n._lang;"common"!==r&&r!==t||!this.enabled(n.name)||(this._onBeforeRule&&this._onBeforeRule(e),e=n.func.call(this,e,this._settings[n.name]),this._onAfterRule&&this._onAfterRule(e))},c=function(e){u[e]&&u[e].forEach(s,r),a[e]&&a[e].forEach(s,r)};if(this._lang=t,e=""+e,!e)return"";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;a[n]=a[n]||[],a[n].push(e)},this),c("start");var i=-1!==e.search(/<[a-z!]/i);return i&&(e=this._hideSafeTags(e)),e=this._utfication(e),c(),e=this._modification(e,o),i&&(e=this._showSafeTags(e)),c("end"),this._lang=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])},letters:function(){var e=this._lang||this._prefs.lang,n=this.data("common/letter"),r=this.data(e+"/letter");return n!==r&&e?n+r:n},data:function(e){return this._data[e]},_data:{},_fixLineEnd:function(e){return e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")},_prepareRule:function(e){var n=e.name;this._settings[n]=e.settings||{},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 t=e.name;r.test(t)&&(this._enabledRules[t]=n)},this)):this._enabledRules[e]=n},_rules:[],_innerRules:[],_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(e){return"\udbfftf"+e+"\udbff"},_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)},_showSafeTags:function(e){for(var n=0;n<this._safeTags.length&&(e=e.replace(/\uDBFFtf\d+\uDBFF/g,this._replaceLabel),-1!==e.search(/\uDBFFtf\d/));n++);return delete this._hiddenSafeTags,e},_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},_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.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]].forEach(function(n){var r=n[0],t=n[1],a=String.fromCharCode(t),u=["&"+r+";","&#"+t+";",a,new RegExp("&"+r+";","g"),new RegExp(a,"g")];e.prototype.entities.push(u)},this),e.data("common/dash","--?|\u2012|\u2013|\u2014"),e.data("common/letter","a-z"),e.data("common/quot","\xab\u2039\xbb\u203a\u201e\u201a\u201c\u201f\u2018\u201b\u201d\u2019\"'"),e.data("en/letter","a-z"),e.data("ru/letter","\u0430-\u044f\u0451"),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"]),e.data("ru/monthCase",["\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"]),e.data("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/escape",sortIndex:110,queue:"end",func:function(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return e.replace(/[&<>"'\/]/g,function(e){return n[e]})},disabled:!0}),e.rule({name:"common/html/mail",sortIndex:2e3,func: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/nbr",sortIndex:2020,func:function(e){return-1===e.search(/<br/)?e.replace(/\n/g,"<br/>\n"):e},disabled:!0}),e.rule({name:"common/html/pbr",sortIndex:2030,func:function(e){return-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",sortIndex:100,queue:"end",func:function(e){return e.replace(/<\/?[^>]+>/g,"")},disabled:!0}),e.rule({name:"common/html/url",sortIndex:2010,func:function(e){var n="(http|https|ftp|telnet|news|gopher|file|wais)://",r="([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)",t=new RegExp(n+r,"g");return e.replace(t,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 t=r,a=n+"://"+r,u='<a href="'+a+'">';return"http"===n||"https"===n?(t=t.replace(/^www\./,""),u+("http"===n?t:n+"://"+t)+"</a>"):u+a+"</a>"})},disabled:!0}),e.rule({name:"common/nbsp/afterNumber",sortIndex:615,func:function(e){var n="(^|\\D)(\\d{1,5}) (["+this.letters()+"]{2,})";return e.replace(new RegExp(n,"gi"),"$1$2\xa0$3")}}),e.rule({name:"common/nbsp/afterPara",sortIndex:610,func:function(e){return e.replace(/\xa7 ?(\d|I|V|X)/g,"\xa7\xa0$1")}}),e.rule({name:"common/nbsp/afterShortWord",sortIndex:590,func:function(e,n){var r=n.lengthShortWord,t="(^| |\xa0)(["+this.letters()+"]{1,"+r+"})(\\.?) ",a=new RegExp(t,"gi");return e.replace(a,"$1$2$3\xa0").replace(a,"$1$2$3\xa0")},settings:{lengthShortWord:2}}),e.rule({name:"common/nbsp/beforeShortLastWord",sortIndex:620,func:function(e,n){var r=n.lengthLastWord,t=".,?!:;",a=new RegExp("([^"+t+"]) (["+this.letters()+"]{1,"+r+"}["+t+"])","gi");return e.replace(a,"$1\xa0$2")},settings:{lengthLastWord:3}}),e.rule({name:"common/nbsp/dpi",sortIndex:1150,func:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1\xa0$2")}}),function(){function n(e,n,r,t){return n+r.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+t}e.rule({name:"common/nbsp/nowrap",sortIndex:1400,func:function(e){return e.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,n).replace(/(<nobr>)(.*?)(<\/nobr>)/g,n)}})}(),e.rule({name:"common/number/fraction",sortIndex:1120,func: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/plusMinus",sortIndex:1010,func:function(e){var n=new RegExp("(^| |\\>|\xa0)\\+-(\\d)","g");return e.replace(n,"$1\xb1$2").replace(/(^\s*)\+-(\s*$)/g,"$1\xb1$2")}}),e.rule({name:"common/number/times",sortIndex:1050,func:function(e){return e.replace(/(\d) ?(x|\u0445) ?(\d)/g,"$1\xd7$3")}}),e.rule({name:"common/other/repeatWord",sortIndex:1200,func:function(e){var n="(["+this.letters()+"\u0301]+) \\1([;:,.?! \n])";return e.replace(new RegExp(n,"gi"),"$1$2")},disabled:!0}),e.rule({name:"common/punctuation/delDoublePunctuation",sortIndex:580,func:function(e){return e.replace(/(,|:|;|\?){2,}/g,"$1")}}),e.rule({name:"common/punctuation/exclamation",sortIndex:1150,func:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/,"$1!!!$2")}}),e.rule({name:"common/punctuation/exclamationQuestion",sortIndex:1140,func:function(e){var n=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(n,"$1?!$2")}}),e.rule({name:"common/punctuation/hellip",sortIndex:20,func:function(e){return e.replace(/(^|[^.])\.{3,4}([^.]|$)/g,"$1\u2026$2")}}),e.rule({name:"common/space/afterPunctuation",sortIndex:560,func:function(e){var n=new RegExp("(!|;|\\?)([^ \udbff\n !;?"+this.data("common/quot")+"[])","g");return e.replace(n,"$1 $2").replace(/(\D)(,|:)([^ \/\uDBFF\n\t,.?:])/g,"$1$2 $3")}}),e.rule({name:"common/space/delBeforePercent",sortIndex:600,func:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}}),e.rule({name:"common/space/delBeforePunctuation",sortIndex:550,func:function(e){return e.replace(/ (!|;|,|\?|\.|:)/g,"$1").replace(/\( /g,"(").replace(/([^ ])\(/g,"$1 (").replace(/ \)/g,")").replace(/\)([^!;,\?\.:])/g,") $1")}}),e.rule({name:"common/space/delLeadingBlanks",sortIndex:504,func:function(e){return e.replace(/\n[ \t]+/g,"\n")},disabled:!0}),e.rule({name:"common/space/delRepeatN",sortIndex:545,func:function(e){return e.replace(/\n{3,}/g,"\n\n")}}),e.rule({name:"common/space/delRepeatSpace",sortIndex:540,func:function(e){return e.replace(/([^\n \t])( |\t){2,}([^\n \t])/g,"$1$2$3")}}),e.rule({name:"common/space/delTrailingBlanks",sortIndex:505,func:function(e){return e.replace(/[ \t]+\n/g,"\n")}}),e.rule({name:"common/space/replaceTab",sortIndex:510,func:function(e){return e.replace(/\t/g," ")}}),e.rule({name:"common/space/trimLeft",sortIndex:530,func:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}}),e.rule({name:"common/space/trimRight",sortIndex:535,func:String.prototype.trimRight?function(e){return e.trimRight()}:function(e){return e.replace(/[\s\uFEFF\xA0]+$/g,"")}}),e.rule({name:"common/sym/arrow",sortIndex:1130,func:function(e){return e.replace(/(^|[^-])->(?!>)/g,"$1\u2192").replace(/(^|[^<])<-(?!-)/g,"$1\u2190")}}),e.rule({name:"common/sym/cf",sortIndex:1020,func: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/sym/copy",sortIndex:10,func:function(e){return e.replace(/\(r\)/gi,"\xae").replace(/(copyright )?\((c|\u0441)\)/gi,"\xa9").replace(/\(tm\)/gi,"\u2122")}}),e.rule({name:"ru/date/main",sortIndex:1300,func:function(e){var n="(-|\\.|\\/)",r="(-|\\/)",t=new RegExp("(^|\\D)(\\d{4})"+n+"(\\d{2})"+n+"(\\d{2})(\\D|$)","gi"),a=new RegExp("(^|\\D)(\\d{2})"+r+"(\\d{2})"+r+"(\\d{4})(\\D|$)","gi");return e.replace(t,"$1$6.$4.$2$7").replace(a,"$1$4.$2.$6$7")}}),e.rule({name:"ru/date/weekday",sortIndex:1310,func:function(e){var n="( |\xa0)",r=this.data("ru/monthCase").join("|"),t=this.data("ru/weekday").join("|"),a=new RegExp("(\\d)"+n+"("+r+"),"+n+"("+t+")","gi");return e.replace(a,function(){var e=arguments;return e[1]+e[2]+e[3].toLowerCase()+","+e[4]+e[5].toLowerCase()})}}),e.rule({name:"ru/money/dollar",sortIndex:1140,func:function(e){var n=new RegExp("(^|[\\D]{2,})\\$ ?([\\d.,]+)","g"),r=new RegExp("(^|[\\D])([\\d.,]+) ?\\$","g"),t="$1$2\xa0$";return e.replace(n,t).replace(r,t)}}),e.rule({name:"ru/money/euro",sortIndex:1140,func:function(e){var n=new RegExp("(^|[\\D]{2,})\u20ac ?([\\d.]+)","g"),r=new RegExp("(^|[\\D])([\\d.,]+) ?\u20ac","g"),t="$1$2\xa0\u20ac";return e.replace(n,t).replace(r,t)}}),e.rule({name:"ru/money/ruble",sortIndex:1145,func: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/addr",sortIndex:1115,func: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|\u0433|\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")}}),e.rule({name:"ru/nbsp/afterNumberSign",sortIndex:610,func:function(e){return e.replace(/\u2116 ?(\d|\u043f\/\u043f)/g,"\u2116\xa0$1")}}),e.rule({name:"ru/nbsp/beforeParticle",sortIndex:570,func:function(e){return e.replace(/ (\u043b\u0438|\u043b\u044c|\u0436\u0435|\u0436|\u0431\u044b|\u0431)([^\u0430-\u044f\u0451\u0410-\u042f\u0401])/g,"\xa0$1$2")}}),e.rule({name:"ru/nbsp/but",sortIndex:1110,func:function(e){var n=new RegExp(",?( |\xa0|\n)(\u0430|\u043d\u043e)( |\xa0|\n)","g");return e.replace(n,",$1$2$3")}}),e.rule({name:"ru/nbsp/cc",sortIndex:1090,func:function(e){return e=e.replace(/(^|\d|V|I|X) ?\u0432(\u0432)?( |,|;|\n|$)/g,"$1\xa0\u0432$2.$3"),e.replace(/(^|\d|[IVX]) ?\u0432\.? ?\u0432\./g,"$1\xa0\u0432\u0432.")}}),e.rule({name:"ru/nbsp/dayMonth",sortIndex:1105,func:function(e){var n=new RegExp("(\\d{1,2}) ("+this.data("ru/shortMonth").join("|")+")","gi");return e.replace(n,"$1\xa0$2")}}),e.rule({name:"ru/nbsp/m",sortIndex:1030,func:function(e){var n="(\u043a\u043c|\u043c|\u0434\u043c|\u0441\u043c|\u043c\u043c)",r=new RegExp("(^|\\D)(\\d+) ?"+n+"2(\\D|$)","g"),t=new RegExp("(^|\\D)(\\d+) ?"+n+"3(\\D|$)","g");return e.replace(r,"$1$2\xa0$3\xb2$4").replace(t,"$1$2\xa0$3\xb3$4")}}),e.rule({name:"ru/nbsp/ooo",sortIndex:1100,func: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",sortIndex:610,func:function(e){return e.replace(/ (\u0441\u0442\u0440|\u0433\u043b|\u0440\u0438\u0441|\u0438\u043b\u043b)\./g,"\xa0$1.")}}),e.rule({name:"ru/nbsp/xxxx",sortIndex:1060,func:function(e){return e.replace(/(^|\D)(\d{1,4}) ?\u0433(\u043e\u0434| |,|;|\.|\n|$)/g,"$1$2\xa0\u0433$3")}}),e.rule({name:"ru/nbsp/yy",sortIndex:1080,func:function(e){return e.replace(/(^|\d) ?\u0433\. ?\u0433\./g,"$1\xa0\u0433\u0433.")}}),e.data("ru/dash",{before:"(^| |\\n)",after:"( |,|\\.|\\?|:|!|$)"}),e.rule({name:"ru/dash/izpod",sortIndex:35,func:function(e){var n=this.data("ru/dash"),r=new RegExp(n.before+"(\u0418|\u0438)\u0437 \u043f\u043e\u0434"+n.after,"g");return e.replace(r,"$1$2\u0437-\u043f\u043e\u0434$3")}}),e.rule({name:"ru/dash/izza",sortIndex:33,func:function(e){var n=this.data("ru/dash"),r=new RegExp(n.before+"(\u0418|\u0438)\u0437 \u0437\u0430"+n.after,"g");return e.replace(r,"$1$2\u0437-\u0437\u0430$3")}}),e.rule({name:"ru/dash/kade",sortIndex:31,func:function(e){var n=new RegExp("([a-\u044f\u0451]+)( | ?- ?)(\u043a\u0430|\u0434\u0435|\u043a\u0430\u0441\u044c)"+this.data("ru/dash").after,"g");return e.replace(n,"$1-$3$4")}}),e.rule({name:"ru/dash/koe",sortIndex:38,func:function(e){var n=this.data("ru/dash"),r=new RegExp(n.before+"([\u041a\u043a]\u043e[\u0435\u0439])\\s([\u0430-\u044f\u0451]{3,})"+n.after,"g");return e.replace(r,"$1$2-$3$4")}}),e.rule({name:"ru/dash/main",sortIndex:620,func:function(e){var n="ru/dash/main",r="("+this.data("common/dash")+")",t=new RegExp("( |\xa0)"+r+"( |\\n)","g"),a=new RegExp("(^|\n)"+r+"( |\xa0)","g"),u=new RegExp("(X|I|V)(?: |\xa0)?"+r+"(?: |\xa0)?(X|I|V)","g");return e.replace(t,"\xa0"+this.setting(n,"dash")+"$3").replace(a,"$1"+this.setting(n,"dash")+"\xa0").replace(u,"$1"+this.setting(n,"dashInterval")+"$3")},settings:{dash:"\u2014",dashInterval:"\u2014"}}),e.rule({name:"ru/dash/month",sortIndex:610,func:function(e){var n="("+this.data("ru/month").join("|")+")",r=new RegExp(n+" ?("+this.data("common/dash")+") ?"+n,"gi");return e.replace(r,"$1"+this.setting("ru/dash/main","dashInterval")+"$3")}}),e.rule({name:"ru/dash/taki",sortIndex:39,func:function(e){var n=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)"+this.data("ru/dash").after,"g");return e.replace(n,"$1-$2$3")}}),function(){var n=["\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"];e.rule({name:"ru/dash/to",sortIndex:30,func:function(e){var r=new RegExp("("+n.join("|")+")( | ?- ?)(\u0442\u043e|\u043b\u0438\u0431\u043e|\u043d\u0438\u0431\u0443\u0434\u044c)"+this.data("ru/dash").after,"gi");return e.replace(r,"$1-$3$4")}})}(),e.rule({name:"ru/dash/weekday",sortIndex:600,func:function(e){var n="("+this.data("ru/weekday").join("|")+")",r=new RegExp(n+" ?("+this.data("common/dash")+") ?"+n,"gi");return e.replace(r,"$1"+this.setting("ru/dash/main","dashInterval")+"$3")}}),e.rule({name:"ru/number/ordinals",sortIndex:1300,func:function(e){return e.replace(/(\d)-(\u044b\u0439|\u043e\u0439)([^\u0430-\u044f\u0451]|$)/g,"$1-\u0439$3").replace(/(\d)-\u0430\u044f([^\u0430-\u044f\u0451]|$)/g,"$1-\u044f$2").replace(/(\d)-(\u043e\u0435|\u044b\u0435)([^\u0430-\u044f\u0451]|$)/g,"$1-\u0435$3").replace(/(\d)-(\u044b\u043c|\u043e\u043c)([^\u0430-\u044f\u0451]|$)/g,"$1-\u043c$3").replace(/(\d)-\u044b\u0445([^\u0430-\u044f\u0451]|$)/g,"$1-\u0445$2").replace(/(\d)-\u043e\u0433\u043e([^\u0430-\u044f\u0451]|$)/g,"$1-\u0433\u043e$2").replace(/(\d)-\u043e\u043c\u0443([^\u0430-\u044f\u0451]|$)/g,"$1-\u043c\u0443$2").replace(/(\d)-\u044b\u043c\u0438([^\u0430-\u044f\u0451]|$)/g,"$1-\u043c\u0438$2")}}),e.rule({name:"ru/optalign/bracket",sortIndex:1001,func:function(e,n){return e.replace(/( |\u00A0)\(/g,'<span class="typograf-oa-sp-lbracket">$1</span><span class="typograf-oa-lbracket">(</span>').replace(/(^|\n)\(/g,'$1<span class="typograf-oa-n-lbracket">(</span>')},disabled:!0}).innerRule({name:"ru/optalign/bracket",func:function(e){return e.replace(/<span class="typograf-oa-(sp-lbracket|lbracket|n-lbracket)">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/optalign/comma",sortIndex:1002,func:function(e,n){var r=new RegExp("(["+this.letters()+"\\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",func:function(e){return e.replace(/<span class="typograf-oa-(comma|comma-sp)">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/optalign/quot",sortIndex:1e3,func:function(e){var n='(["'+this.setting("ru/punctuation/quot","lquot")+this.setting("ru/punctuation/quot","lquot2")+"])",r=new RegExp("([\\d"+this.letters()+"\\-\u0301!?.:;,]+)( |\xa0)("+n+")","gi"),t=new RegExp("(^|\n|\udbff)"+n,"g");return e.replace(r,'$1<span class="typograf-oa-sp-lquot">$2</span><span class="typograf-oa-lquot">$3</span>').replace(t,'$1<span class="typograf-oa-n-lquot">$2</span>')},disabled:!0}).innerRule({name:"ru/optalign/quot",func:function(e){return e.replace(/<span class="typograf-oa-(sp-lquot|lquot|n-lquot)">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/other/accent",sortIndex:560,func: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,t){return n+r.toLowerCase()+"\u0301"+t})},disabled:!0}),e.rule({name:"ru/punctuation/quot",sortIndex:700,func:e._quot,settings:{lquot:"\xab",rquot:"\xbb",lquot2:"\u201e",rquot2:"\u201c"}}),e.rule({name:"en/punctuation/quot",sortIndex:700,func:e._quot,settings:{lquot:"\u201c",rquot:"\u201d",lquot2:"\u2018",rquot2:"\u2019"}}),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._settings={},this._enabledRules={},this._replaceLabel=this._replaceLabel.bind(this),this._pasteLabel=this._pasteLabel.bind(this),this._initSafeTags(),this._rules.forEach(this._prepareRule,this)}return e.rule=function(n){return n.enabled=n.enabled===!1||n.disabled===!0?!1:!0,n._lang=n.name.split("/")[0],n.sortIndex=n.sortIndex||0,e.prototype._rules.push(n),e._needSortRules&&this._sortRules(),this},e.innerRule=function(n){return e.prototype._innerRules.push(n),n._lang=n.name.split("/")[0],n.sortIndex=n.sortIndex||0,e._needSortRules&&this._sortInnerRules(),this},e.data=function(n,r){e.prototype._data[n]=r},e._sortRules=function(){e.prototype._rules.sort(function(e,n){return e.sortIndex>n.sortIndex?1:-1})},e._sortInnerRules=function(){e.prototype._innerRules.sort(function(e,n){return e.sortIndex>n.sortIndex?1:-1})},e._quot=function(e,n){var r="\\d"+this.letters()+"\u0301",t=n.lquot,a=n.rquot,u=n.lquot2,s=n.rquot2,o='[\xab\u201e\u201c"]',c='[\xbb\u201d\u201c"]',i='[\xab\xbb\u201e\u201c\u201d"]',l="["+r+")!?.:;#*,]*?",p=new RegExp(o+"([\u2026"+r+"])","gi"),d=new RegExp("("+l+")"+c+"("+l+")","gi"),f=new RegExp(s+"([^"+u+s+"]*?)"+s,"g"),g=new RegExp(u+"([^"+u+s+"]*?)"+u,"g"),m=new RegExp(u,"g"),h=new RegExp(s,"g"),$=new RegExp("(^|\\s)"+i+"\udbff","g"),x=new RegExp("\udbff"+i+"([s!?.:;#*,]|$)","g");return e=e.replace(p,u+"$1").replace(d,"$1"+s+"$2").replace($,"$1"+u+"\udbff").replace(x,"\udbff"+s+"$1").replace(new RegExp("(^|\\w|\\s)"+s+u,"g"),"$1"+u+u),t===u&&a===s?e=e.replace(m,t).replace(h,a).replace(new RegExp(t+t,"g"),t).replace(new RegExp(a+a,"g"),a):(e=e.replace(f,s+"$1"+a).replace(g,t+"$1"+u),-1===e.search(new RegExp(t+"|"+a))&&(e=e.replace(m,t).replace(h,a))),e},e._langs=["en","ru"],e.prototype={constructor:e,execute:function(e,n){n=n||{};var r=this,t=n.lang||this._prefs.lang||"common",a={},u={},s="undefined"==typeof n.mode?this._prefs.mode:n.mode,o=function(n){var r=n._lang;"common"!==r&&r!==t||!this.enabled(n.name)||(this._onBeforeRule&&this._onBeforeRule(e),e=n.func.call(this,e,this._settings[n.name]),this._onAfterRule&&this._onAfterRule(e))},c=function(e){u[e]&&u[e].forEach(o,r),a[e]&&a[e].forEach(o,r)};return this._lang=t,(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;a[n]=a[n]||[],a[n].push(e)},this),this._isHTML=-1!==e.search(/<[a-z!]/i),c("start"),this._isHTML&&(e=this._hideSafeTags(e)),e=this._utfication(e),c(),e=this._modification(e,s),this._isHTML&&(e=this._showSafeTags(e)),c("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])},letters:function(){var e=this._lang||this._prefs.lang,n=this.data("common/letter"),r=this.data(e+"/letter");return n!==r&&e?n+r:n},data:function(e){return this._data[e]},_data:{},_fixLineEnd:function(e){return e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")},_prepareRule:function(e){var n=e.name;this._settings[n]=e.settings||{},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 t=e.name;r.test(t)&&(this._enabledRules[t]=n)},this)):this._enabledRules[e]=n},_rules:[],_innerRules:[],_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(e){return"\udbfftf"+e+"\udbff"},_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)},_showSafeTags:function(e){for(var n=0;n<this._safeTags.length&&(e=e.replace(/\uDBFFtf\d+\uDBFF/g,this._replaceLabel),-1!==e.search(/\uDBFFtf\d/));n++);return delete this._hiddenSafeTags,e},_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},_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.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]].forEach(function(n){var r=n[0],t=n[1],a=String.fromCharCode(t),u=["&"+r+";","&#"+t+";",a,new RegExp("&"+r+";","g"),new RegExp(a,"g")];e.prototype.entities.push(u)},this),e.data("common/dash","--?|\u2012|\u2013|\u2014"),e.data("common/letter","a-z"),e.data("common/quot","\xab\u2039\xbb\u203a\u201e\u201a\u201c\u201f\u2018\u201b\u201d\u2019\"'"),e.data("en/letter","a-z"),e.data("ru/letter","\u0430-\u044f\u0451"),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"]),e.data("ru/monthCase",["\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"]),e.data("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/escape",sortIndex:110,queue:"end",func:function(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return e.replace(/[&<>"'\/]/g,function(e){return n[e]})},disabled:!0}),e.rule({name:"common/html/mail",sortIndex:2e3,func: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/nbr",sortIndex:110,queue:"start",func:function(e){return-1===e.search(/<br/)?e.replace(/\n/g,"<br/>\n"):e},disabled:!0}),e.rule({name:"common/html/pbr",sortIndex:90,queue:"end",func: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",sortIndex:100,queue:"end",func:function(e){return e.replace(/<\/?[^>]+>/g,"")},disabled:!0}),e.rule({name:"common/html/url",sortIndex:2010,func:function(e){var n="(http|https|ftp|telnet|news|gopher|file|wais)://",r="([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)",t=new RegExp(n+r,"g");return e.replace(t,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 t=r,a=n+"://"+r,u='<a href="'+a+'">';return"http"===n||"https"===n?(t=t.replace(/^www\./,""),u+("http"===n?t:n+"://"+t)+"</a>"):u+a+"</a>"})},disabled:!0}),e.rule({name:"common/nbsp/afterNumber",sortIndex:615,func:function(e){var n="(^|\\D)(\\d{1,5}) (["+this.letters()+"]{2,})";return e.replace(new RegExp(n,"gi"),"$1$2\xa0$3")}}),e.rule({name:"common/nbsp/afterPara",sortIndex:610,func:function(e){return e.replace(/\xa7 ?(\d|I|V|X)/g,"\xa7\xa0$1")}}),e.rule({name:"common/nbsp/afterShortWord",sortIndex:590,func:function(e,n){var r=n.lengthShortWord,t="(^| |\xa0)(["+this.letters()+"]{1,"+r+"})(\\.?) ",a=new RegExp(t,"gi");return e.replace(a,"$1$2$3\xa0").replace(a,"$1$2$3\xa0")},settings:{lengthShortWord:2}}),e.rule({name:"common/nbsp/beforeShortLastWord",sortIndex:620,func:function(e,n){var r=n.lengthLastWord,t=".,?!:;",a=new RegExp("([^"+t+"]) (["+this.letters()+"]{1,"+r+"}["+t+"])","gi");return e.replace(a,"$1\xa0$2")},settings:{lengthLastWord:3}}),e.rule({name:"common/nbsp/dpi",sortIndex:1150,func:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1\xa0$2")}}),function(){function n(e,n,r,t){return n+r.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+t}e.rule({name:"common/nbsp/nowrap",sortIndex:100,queue:"start",func:function(e){return e.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,n).replace(/(<nobr>)(.*?)(<\/nobr>)/g,n)}})}(),e.rule({name:"common/number/fraction",sortIndex:1120,func: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/plusMinus",sortIndex:1010,func:function(e){var n=new RegExp("(^| |\\>|\xa0)\\+-(\\d)","g");return e.replace(n,"$1\xb1$2").replace(/(^\s*)\+-(\s*$)/g,"$1\xb1$2")}}),e.rule({name:"common/number/times",sortIndex:1050,func:function(e){return e.replace(/(\d) ?(x|\u0445) ?(\d)/g,"$1\xd7$3")}}),e.rule({name:"common/punctuation/delDoublePunctuation",sortIndex:580,func:function(e){return e.replace(/(,|:|;|\?){2,}/g,"$1")}}),e.rule({name:"common/punctuation/exclamation",sortIndex:1150,func:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/,"$1!!!$2")}}),e.rule({name:"common/punctuation/exclamationQuestion",sortIndex:1140,func:function(e){var n=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(n,"$1?!$2")}}),e.rule({name:"common/punctuation/hellip",sortIndex:20,func:function(e){return e.replace(/(^|[^.])\.{3,4}([^.]|$)/g,"$1\u2026$2")}}),e.rule({name:"common/other/repeatWord",sortIndex:1200,func:function(e){var n="(["+this.letters()+"\u0301]+) \\1([;:,.?! \n])";return e.replace(new RegExp(n,"gi"),"$1$2")},disabled:!0}),e.rule({name:"common/space/afterPunctuation",sortIndex:560,func:function(e){var n=new RegExp("(!|;|\\?)([^ \udbff\n !;?"+this.data("common/quot")+"[])","g");return e.replace(n,"$1 $2").replace(/(\D)(,|:)([^ \/\uDBFF\n\t,.?:])/g,"$1$2 $3")}}),e.rule({name:"common/space/delBeforePercent",sortIndex:600,func:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}}),e.rule({name:"common/space/delBeforePunctuation",sortIndex:550,func:function(e){return e.replace(/ (!|;|,|\?|\.|:)/g,"$1").replace(/\( /g,"(").replace(/([^ ])\(/g,"$1 (").replace(/ \)/g,")").replace(/\)([^!;,\?\.:])/g,") $1")}}),e.rule({name:"common/space/delLeadingBlanks",sortIndex:504,func:function(e){return e.replace(/\n[ \t]+/g,"\n")},disabled:!0}),e.rule({name:"common/space/delRepeatN",sortIndex:545,func:function(e){return e.replace(/\n{3,}/g,"\n\n")}}),e.rule({name:"common/space/delRepeatSpace",sortIndex:540,func:function(e){return e.replace(/([^\n \t])( |\t){2,}([^\n \t])/g,"$1$2$3")}}),e.rule({name:"common/space/delTrailingBlanks",sortIndex:505,func:function(e){return e.replace(/[ \t]+\n/g,"\n")}}),e.rule({name:"common/space/replaceTab",sortIndex:510,func:function(e){return e.replace(/\t/g," ")}}),e.rule({name:"common/space/trimLeft",sortIndex:530,func:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}}),e.rule({name:"common/space/trimRight",sortIndex:535,func:String.prototype.trimRight?function(e){return e.trimRight()}:function(e){return e.replace(/[\s\uFEFF\xA0]+$/g,"")}}),e.rule({name:"common/sym/arrow",sortIndex:1130,func:function(e){return e.replace(/(^|[^-])->(?!>)/g,"$1\u2192").replace(/(^|[^<])<-(?!-)/g,"$1\u2190")}}),e.rule({name:"common/sym/cf",sortIndex:1020,func: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/sym/copy",sortIndex:10,func:function(e){return e.replace(/\(r\)/gi,"\xae").replace(/(copyright )?\((c|\u0441)\)/gi,"\xa9").replace(/\(tm\)/gi,"\u2122")}}),e.rule({name:"en/punctuation/quot",sortIndex:700,func:e._quot,settings:{lquot:"\u201c",rquot:"\u201d",lquot2:"\u2018",rquot2:"\u2019"}}),e.data("ru/dash",{before:"(^| |\\n)",after:"( |,|\\.|\\?|:|!|$)"}),e.rule({name:"ru/dash/izpod",sortIndex:35,func:function(e){var n=this.data("ru/dash"),r=new RegExp(n.before+"(\u0418|\u0438)\u0437 \u043f\u043e\u0434"+n.after,"g");return e.replace(r,"$1$2\u0437-\u043f\u043e\u0434$3")}}),e.rule({name:"ru/dash/izza",sortIndex:33,func:function(e){var n=this.data("ru/dash"),r=new RegExp(n.before+"(\u0418|\u0438)\u0437 \u0437\u0430"+n.after,"g");return e.replace(r,"$1$2\u0437-\u0437\u0430$3")}}),e.rule({name:"ru/dash/kade",sortIndex:31,func:function(e){var n=new RegExp("([a-\u044f\u0451]+)( | ?- ?)(\u043a\u0430|\u0434\u0435|\u043a\u0430\u0441\u044c)"+this.data("ru/dash").after,"g");return e.replace(n,"$1-$3$4")}}),e.rule({name:"ru/dash/koe",sortIndex:38,func:function(e){var n=this.data("ru/dash"),r=new RegExp(n.before+"([\u041a\u043a]\u043e[\u0435\u0439])\\s([\u0430-\u044f\u0451]{3,})"+n.after,"g");return e.replace(r,"$1$2-$3$4")}}),e.rule({name:"ru/dash/main",sortIndex:620,func:function(e){var n="ru/dash/main",r="("+this.data("common/dash")+")",t=new RegExp("( |\xa0)"+r+"( |\\n)","g"),a=new RegExp("(^|\n)"+r+"( |\xa0)","g"),u=new RegExp("(X|I|V)(?: |\xa0)?"+r+"(?: |\xa0)?(X|I|V)","g");return e.replace(t,"\xa0"+this.setting(n,"dash")+"$3").replace(a,"$1"+this.setting(n,"dash")+"\xa0").replace(u,"$1"+this.setting(n,"dashInterval")+"$3")},settings:{dash:"\u2014",dashInterval:"\u2014"}}),e.rule({name:"ru/dash/month",sortIndex:610,func:function(e){var n="("+this.data("ru/month").join("|")+")",r=new RegExp(n+" ?("+this.data("common/dash")+") ?"+n,"gi");return e.replace(r,"$1"+this.setting("ru/dash/main","dashInterval")+"$3")}}),e.rule({name:"ru/dash/taki",sortIndex:39,func:function(e){var n=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)"+this.data("ru/dash").after,"g");return e.replace(n,"$1-$2$3")}}),function(){var n=["\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"];e.rule({name:"ru/dash/to",sortIndex:30,func:function(e){var r=new RegExp("("+n.join("|")+")( | ?- ?)(\u0442\u043e|\u043b\u0438\u0431\u043e|\u043d\u0438\u0431\u0443\u0434\u044c)"+this.data("ru/dash").after,"gi");return e.replace(r,"$1-$3$4")}})}(),e.rule({name:"ru/dash/weekday",sortIndex:600,func:function(e){var n="("+this.data("ru/weekday").join("|")+")",r=new RegExp(n+" ?("+this.data("common/dash")+") ?"+n,"gi");return e.replace(r,"$1"+this.setting("ru/dash/main","dashInterval")+"$3")}}),e.rule({name:"ru/date/main",sortIndex:1300,func:function(e){var n="(-|\\.|\\/)",r="(-|\\/)",t=new RegExp("(^|\\D)(\\d{4})"+n+"(\\d{2})"+n+"(\\d{2})(\\D|$)","gi"),a=new RegExp("(^|\\D)(\\d{2})"+r+"(\\d{2})"+r+"(\\d{4})(\\D|$)","gi");return e.replace(t,"$1$6.$4.$2$7").replace(a,"$1$4.$2.$6$7")}}),e.rule({name:"ru/date/weekday",sortIndex:1310,func:function(e){var n="( |\xa0)",r=this.data("ru/monthCase").join("|"),t=this.data("ru/weekday").join("|"),a=new RegExp("(\\d)"+n+"("+r+"),"+n+"("+t+")","gi");return e.replace(a,function(){var e=arguments;return e[1]+e[2]+e[3].toLowerCase()+","+e[4]+e[5].toLowerCase()})}}),e.rule({name:"ru/money/dollar",sortIndex:1140,func:function(e){var n=new RegExp("(^|[\\D]{2,})\\$ ?([\\d.,]+)","g"),r=new RegExp("(^|[\\D])([\\d.,]+) ?\\$","g"),t="$1$2\xa0$";return e.replace(n,t).replace(r,t)}}),e.rule({name:"ru/money/euro",sortIndex:1140,func:function(e){var n=new RegExp("(^|[\\D]{2,})\u20ac ?([\\d.]+)","g"),r=new RegExp("(^|[\\D])([\\d.,]+) ?\u20ac","g"),t="$1$2\xa0\u20ac";return e.replace(n,t).replace(r,t)}}),e.rule({name:"ru/money/ruble",sortIndex:1145,func: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/addr",sortIndex:1115,func: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|\u0433|\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")}}),e.rule({name:"ru/nbsp/afterNumberSign",sortIndex:610,func:function(e){return e.replace(/\u2116 ?(\d|\u043f\/\u043f)/g,"\u2116\xa0$1")}}),e.rule({name:"ru/nbsp/beforeParticle",sortIndex:570,func:function(e){return e.replace(/ (\u043b\u0438|\u043b\u044c|\u0436\u0435|\u0436|\u0431\u044b|\u0431)([^\u0430-\u044f\u0451\u0410-\u042f\u0401])/g,"\xa0$1$2")}}),e.rule({name:"ru/nbsp/but",sortIndex:1110,func:function(e){var n=new RegExp(",?( |\xa0|\n)(\u0430|\u043d\u043e)( |\xa0|\n)","g");return e.replace(n,",$1$2$3")}}),e.rule({name:"ru/nbsp/cc",sortIndex:1090,func:function(e){return e=e.replace(/(^|\d|V|I|X) ?\u0432(\u0432)?( |,|;|\n|$)/g,"$1\xa0\u0432$2.$3"),e.replace(/(^|\d|[IVX]) ?\u0432\.? ?\u0432\./g,"$1\xa0\u0432\u0432.")}}),e.rule({name:"ru/nbsp/dayMonth",sortIndex:1105,func:function(e){var n=new RegExp("(\\d{1,2}) ("+this.data("ru/shortMonth").join("|")+")","gi");return e.replace(n,"$1\xa0$2")}}),e.rule({name:"ru/nbsp/m",sortIndex:1030,func:function(e){var n="(\u043a\u043c|\u043c|\u0434\u043c|\u0441\u043c|\u043c\u043c)",r=new RegExp("(^|\\D)(\\d+) ?"+n+"2(\\D|$)","g"),t=new RegExp("(^|\\D)(\\d+) ?"+n+"3(\\D|$)","g");return e.replace(r,"$1$2\xa0$3\xb2$4").replace(t,"$1$2\xa0$3\xb3$4")}}),e.rule({name:"ru/nbsp/ooo",sortIndex:1100,func: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",sortIndex:610,func:function(e){return e.replace(/ (\u0441\u0442\u0440|\u0433\u043b|\u0440\u0438\u0441|\u0438\u043b\u043b)\./g,"\xa0$1.")}}),e.rule({name:"ru/nbsp/xxxx",sortIndex:1060,func:function(e){return e.replace(/(^|\D)(\d{1,4}) ?\u0433(\u043e\u0434| |,|;|\.|\n|$)/g,"$1$2\xa0\u0433$3")}}),e.rule({name:"ru/nbsp/yy",sortIndex:1080,func:function(e){return e.replace(/(^|\d) ?\u0433\. ?\u0433\./g,"$1\xa0\u0433\u0433.")}}),e.rule({name:"ru/number/ordinals",sortIndex:1300,func:function(e){return e.replace(/(\d)-(\u044b\u0439|\u043e\u0439)([^\u0430-\u044f\u0451]|$)/g,"$1-\u0439$3").replace(/(\d)-\u0430\u044f([^\u0430-\u044f\u0451]|$)/g,"$1-\u044f$2").replace(/(\d)-(\u043e\u0435|\u044b\u0435)([^\u0430-\u044f\u0451]|$)/g,"$1-\u0435$3").replace(/(\d)-(\u044b\u043c|\u043e\u043c)([^\u0430-\u044f\u0451]|$)/g,"$1-\u043c$3").replace(/(\d)-\u044b\u0445([^\u0430-\u044f\u0451]|$)/g,"$1-\u0445$2").replace(/(\d)-\u043e\u0433\u043e([^\u0430-\u044f\u0451]|$)/g,"$1-\u0433\u043e$2").replace(/(\d)-\u043e\u043c\u0443([^\u0430-\u044f\u0451]|$)/g,"$1-\u043c\u0443$2").replace(/(\d)-\u044b\u043c\u0438([^\u0430-\u044f\u0451]|$)/g,"$1-\u043c\u0438$2")}}),e.rule({name:"ru/optalign/bracket",sortIndex:1001,func:function(e,n){return e.replace(/( |\u00A0)\(/g,'<span class="typograf-oa-sp-lbracket">$1</span><span class="typograf-oa-lbracket">(</span>').replace(/(^|\n)\(/g,'$1<span class="typograf-oa-n-lbracket">(</span>')},disabled:!0}).innerRule({name:"ru/optalign/bracket",func:function(e){return e.replace(/<span class="typograf-oa-(sp-lbracket|lbracket|n-lbracket)">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/optalign/comma",sortIndex:1002,func:function(e,n){var r=new RegExp("(["+this.letters()+"\\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",func:function(e){return e.replace(/<span class="typograf-oa-(comma|comma-sp)">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/optalign/quot",sortIndex:1e3,func:function(e){var n='(["'+this.setting("ru/punctuation/quot","lquot")+this.setting("ru/punctuation/quot","lquot2")+"])",r=new RegExp("([\\d"+this.letters()+"\\-\u0301!?.:;,]+)( |\xa0)("+n+")","gi"),t=new RegExp("(^|\n|\udbff)"+n,"g");return e.replace(r,'$1<span class="typograf-oa-sp-lquot">$2</span><span class="typograf-oa-lquot">$3</span>').replace(t,'$1<span class="typograf-oa-n-lquot">$2</span>')},disabled:!0}).innerRule({name:"ru/optalign/quot",func:function(e){return e.replace(/<span class="typograf-oa-(sp-lquot|lquot|n-lquot)">(.*?)<\/span>/g,"$2")}}),e.rule({name:"ru/other/accent",sortIndex:560,func: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,t){return n+r.toLowerCase()+"\u0301"+t})},disabled:!0}),e.rule({name:"ru/punctuation/quot",sortIndex:700,func:e._quot,settings:{lquot:"\xab",rquot:"\xbb",lquot2:"\u201e",rquot2:"\u201c"}}),e._sortRules(),e._needSortRules=!0,e}); |
Typograf.prototype.titles = { | ||
"common/html/escape": { | ||
"en": "Escaping HTML", | ||
"ru": "Экранирование HTML" | ||
}, | ||
"common/html/mail": { | ||
"en": "Placement of links for e-mail", | ||
"ru": "Расстановка ссылок для эл. почты" | ||
}, | ||
"common/html/nbr": { | ||
"en": "Replacement line break on br tag", | ||
"ru": "Замена перевода строки на тег br" | ||
}, | ||
"common/html/pbr": { | ||
"en": "Placement of p and br tags", | ||
"ru": "Расстановка тегов p и br" | ||
}, | ||
"common/html/stripTags": { | ||
"en": "Removing HTML-tags", | ||
"ru": "Удаление HTML-тегов" | ||
}, | ||
"common/html/url": { | ||
"en": "Placement of links", | ||
"ru": "Расстановка ссылок" | ||
}, | ||
"common/nbsp/afterNumber": { | ||
@@ -77,12 +53,2 @@ "en": "Non-breaking space between number and word", | ||
}, | ||
"common/sym/arrow": { | ||
"common": "-> → →, <- → ←" | ||
}, | ||
"common/sym/cf": { | ||
"en": "Adding ° to C and F", | ||
"ru": "Добавление ° к C и F" | ||
}, | ||
"common/sym/copy": { | ||
"common": "(c) → ©, (tm) → ©, (r) → ™" | ||
}, | ||
"common/space/afterPunctuation": { | ||
@@ -128,2 +94,12 @@ "en": "space after punctuation", | ||
}, | ||
"common/sym/arrow": { | ||
"common": "-> → →, <- → ←" | ||
}, | ||
"common/sym/cf": { | ||
"en": "Adding ° to C and F", | ||
"ru": "Добавление ° к C и F" | ||
}, | ||
"common/sym/copy": { | ||
"common": "(c) → ©, (tm) → ©, (r) → ™" | ||
}, | ||
"en/punctuation/quot": { | ||
@@ -251,3 +227,27 @@ "en": "Placement of quotation marks", | ||
"ru": "Расстановка кавычек" | ||
}, | ||
"common/html/escape": { | ||
"en": "Escaping HTML", | ||
"ru": "Экранирование HTML" | ||
}, | ||
"common/html/mail": { | ||
"en": "Placement of links for e-mail", | ||
"ru": "Расстановка ссылок для эл. почты" | ||
}, | ||
"common/html/nbr": { | ||
"en": "Replacement line break on br tag", | ||
"ru": "Замена перевода строки на тег br" | ||
}, | ||
"common/html/pbr": { | ||
"en": "Placement of p and br tags", | ||
"ru": "Расстановка тегов p и br" | ||
}, | ||
"common/html/stripTags": { | ||
"en": "Removing HTML-tags", | ||
"ru": "Удаление HTML-тегов" | ||
}, | ||
"common/html/url": { | ||
"en": "Placement of links", | ||
"ru": "Расстановка ссылок" | ||
} | ||
}; |
{ | ||
"common/html/escape": { | ||
"en": "Escaping HTML", | ||
"ru": "Экранирование HTML" | ||
}, | ||
"common/html/mail": { | ||
"en": "Placement of links for e-mail", | ||
"ru": "Расстановка ссылок для эл. почты" | ||
}, | ||
"common/html/nbr": { | ||
"en": "Replacement line break on br tag", | ||
"ru": "Замена перевода строки на тег br" | ||
}, | ||
"common/html/pbr": { | ||
"en": "Placement of p and br tags", | ||
"ru": "Расстановка тегов p и br" | ||
}, | ||
"common/html/stripTags": { | ||
"en": "Removing HTML-tags", | ||
"ru": "Удаление HTML-тегов" | ||
}, | ||
"common/html/url": { | ||
"en": "Placement of links", | ||
"ru": "Расстановка ссылок" | ||
}, | ||
"common/nbsp/afterNumber": { | ||
@@ -77,12 +53,2 @@ "en": "Non-breaking space between number and word", | ||
}, | ||
"common/sym/arrow": { | ||
"common": "-> → →, <- → ←" | ||
}, | ||
"common/sym/cf": { | ||
"en": "Adding ° to C and F", | ||
"ru": "Добавление ° к C и F" | ||
}, | ||
"common/sym/copy": { | ||
"common": "(c) → ©, (tm) → ©, (r) → ™" | ||
}, | ||
"common/space/afterPunctuation": { | ||
@@ -128,2 +94,12 @@ "en": "space after punctuation", | ||
}, | ||
"common/sym/arrow": { | ||
"common": "-> → →, <- → ←" | ||
}, | ||
"common/sym/cf": { | ||
"en": "Adding ° to C and F", | ||
"ru": "Добавление ° к C и F" | ||
}, | ||
"common/sym/copy": { | ||
"common": "(c) → ©, (tm) → ©, (r) → ™" | ||
}, | ||
"en/punctuation/quot": { | ||
@@ -251,3 +227,27 @@ "en": "Placement of quotation marks", | ||
"ru": "Расстановка кавычек" | ||
}, | ||
"common/html/escape": { | ||
"en": "Escaping HTML", | ||
"ru": "Экранирование HTML" | ||
}, | ||
"common/html/mail": { | ||
"en": "Placement of links for e-mail", | ||
"ru": "Расстановка ссылок для эл. почты" | ||
}, | ||
"common/html/nbr": { | ||
"en": "Replacement line break on br tag", | ||
"ru": "Замена перевода строки на тег br" | ||
}, | ||
"common/html/pbr": { | ||
"en": "Placement of p and br tags", | ||
"ru": "Расстановка тегов p и br" | ||
}, | ||
"common/html/stripTags": { | ||
"en": "Removing HTML-tags", | ||
"ru": "Удаление HTML-тегов" | ||
}, | ||
"common/html/url": { | ||
"en": "Placement of links", | ||
"ru": "Расстановка ссылок" | ||
} | ||
} |
@@ -5,66 +5,66 @@ ## Rules of typograf | ||
|--:|--------|-------|------------------------------:|:-----:|:--:| | ||
| 1. | [common/sym/copy](../src/rules/common/sym/copy.js) | (c) → ©, (tm) → ©, (r) → ™ | 10 | | ✓ | | ||
| 2. | [common/punctuation/hellip](../src/rules/common/punctuation/hellip.js) | Three points on ellipsis | 20 | | ✓ | | ||
| 3. | [ru/dash/to](../src/rules/ru/dash/to.js) | Hyphen before “то, либо, нибудь” | 30 | | ✓ | | ||
| 4. | [ru/dash/kade](../src/rules/ru/dash/kade.js) | Hyphen before “ка, де, кась” | 31 | | ✓ | | ||
| 5. | [ru/dash/izza](../src/rules/ru/dash/izza.js) | Hyphen between “из-за” | 33 | | ✓ | | ||
| 6. | [ru/dash/izpod](../src/rules/ru/dash/izpod.js) | Hyphen between “из-под” | 35 | | ✓ | | ||
| 7. | [ru/dash/koe](../src/rules/ru/dash/koe.js) | Hyphen after “кое” and “кой” | 38 | | ✓ | | ||
| 8. | [ru/dash/taki](../src/rules/ru/dash/taki.js) | Hyphen between “верно-таки” and etc. | 39 | | ✓ | | ||
| 9. | [common/space/delLeadingBlanks](../src/rules/common/space/delLeadingBlanks.js) | Remove spaces at start of line | 504 | | | | ||
| 10. | [common/space/delTrailingBlanks](../src/rules/common/space/delTrailingBlanks.js) | Remove spaces at end of line | 505 | | ✓ | | ||
| 11. | [common/space/replaceTab](../src/rules/common/space/replaceTab.js) | Replacement of tab to 4 spaces | 510 | | ✓ | | ||
| 12. | [common/space/trimLeft](../src/rules/common/space/trimLeft.js) | Remove spaces and line breaks in beginning of text | 530 | | ✓ | | ||
| 13. | [common/space/trimRight](../src/rules/common/space/trimRight.js) | Remove spaces and line breaks at end of text | 535 | | ✓ | | ||
| 14. | [common/space/delRepeatSpace](../src/rules/common/space/delRepeatSpace.js) | Removing duplicate spaces between characters | 540 | | ✓ | | ||
| 15. | [common/space/delRepeatN](../src/rules/common/space/delRepeatN.js) | Remove duplicate line breaks (no more than two) | 545 | | ✓ | | ||
| 16. | [common/space/delBeforePunctuation](../src/rules/common/space/delBeforePunctuation.js) | Remove spaces before punctuation | 550 | | ✓ | | ||
| 17. | [common/space/afterPunctuation](../src/rules/common/space/afterPunctuation.js) | space after punctuation | 560 | | ✓ | | ||
| 18. | [ru/other/accent](../src/rules/ru/other/accent.js) | Replacing capital letter and adding accents | 560 | | | | ||
| 19. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Non-breaking space before “ли, ль, же, бы, б” | 570 | | ✓ | | ||
| 20. | [common/punctuation/delDoublePunctuation](../src/rules/common/punctuation/delDoublePunctuation.js) | Removing double punctuation | 580 | | ✓ | | ||
| 21. | [common/nbsp/afterShortWord](../src/rules/common/nbsp/afterShortWord.js) | Non-breaking space after short word | 590 | | ✓ | | ||
| 22. | [common/space/delBeforePercent](../src/rules/common/space/delBeforePercent.js) | Remove space before %, ‰ and ‱ | 600 | | ✓ | | ||
| 23. | [ru/dash/weekday](../src/rules/ru/dash/weekday.js) | Dash between the days of the week | 600 | | ✓ | | ||
| 24. | [ru/dash/month](../src/rules/ru/dash/month.js) | Dash between months | 610 | | ✓ | | ||
| 25. | [common/nbsp/afterPara](../src/rules/common/nbsp/afterPara.js) | Non-breaking space after § | 610 | | ✓ | | ||
| 26. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Non-breaking space after № | 610 | | ✓ | | ||
| 27. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Non-breaking space before “стр., гл., рис., илл.” | 610 | | ✓ | | ||
| 28. | [common/nbsp/afterNumber](../src/rules/common/nbsp/afterNumber.js) | Non-breaking space between number and word | 615 | | ✓ | | ||
| 29. | [ru/dash/main](../src/rules/ru/dash/main.js) | Replacement hyphen with dash | 620 | | ✓ | | ||
| 30. | [common/nbsp/beforeShortLastWord](../src/rules/common/nbsp/beforeShortLastWord.js) | Non-breaking space before last short word in sentence | 620 | | ✓ | | ||
| 31. | [ru/punctuation/quot](../src/rules/ru/punctuation/quot.js) | Placement of quotation marks | 700 | | ✓ | | ||
| 32. | [en/punctuation/quot](../src/rules/en/punctuation/quot.js) | Placement of quotation marks | 700 | | ✓ | | ||
| 33. | [ru/optalign/quot](../src/rules/ru/optalign/quot.js) | for opening quotation marks | 1000 | | | | ||
| 34. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | for opening bracket | 1001 | | | | ||
| 35. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | for comma | 1002 | | | | ||
| 36. | [common/number/plusMinus](../src/rules/common/number/plusMinus.js) | +- → ± | 1010 | | ✓ | | ||
| 37. | [common/sym/cf](../src/rules/common/sym/cf.js) | Adding ° to C and F | 1020 | | ✓ | | ||
| 38. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | m2 → м², m3 → м³ and non-breaking space | 1030 | | ✓ | | ||
| 39. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 1050 | | ✓ | | ||
| 40. | [ru/nbsp/xxxx](../src/rules/ru/nbsp/xxxx.js) | Non-breaking space before XXXX г. (2012 г.) | 1060 | | ✓ | | ||
| 41. | [ru/nbsp/yy](../src/rules/ru/nbsp/yy.js) | г.г. → гг. and non-breaking space | 1080 | | ✓ | | ||
| 42. | [ru/nbsp/cc](../src/rules/ru/nbsp/cc.js) | Remove spaces and extra points in centuries | 1090 | | ✓ | | ||
| 43. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Non-breaking space after “OOO, ОАО, ЗАО, НИИ, ПБОЮЛ” | 1100 | | ✓ | | ||
| 44. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Non-breaking space between number and month | 1105 | | ✓ | | ||
| 45. | [ru/nbsp/but](../src/rules/ru/nbsp/but.js) | Placement of commas and non-breaking space before “а” and “но” | 1110 | | ✓ | | ||
| 46. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Placement of non-breaking space after “г.”, “обл.”, “ул.”, “пр.”, “кв.” et al. | 1115 | | ✓ | | ||
| 47. | [common/number/fraction](../src/rules/common/number/fraction.js) | 1/2 → ½, 1/4 → ¼, 3/3 → ¾ | 1120 | | ✓ | | ||
| 48. | [common/sym/arrow](../src/rules/common/sym/arrow.js) | -> → →, <- → ← | 1130 | | ✓ | | ||
| 49. | [common/punctuation/exclamationQuestion](../src/rules/common/punctuation/exclamationQuestion.js) | !? → ?! | 1140 | | ✓ | | ||
| 50. | [ru/money/euro](../src/rules/ru/money/euro.js) | €100 → 100 € | 1140 | | ✓ | | ||
| 51. | [ru/money/dollar](../src/rules/ru/money/dollar.js) | $100 → 100 $ | 1140 | | ✓ | | ||
| 52. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 1145 | | | | ||
| 53. | [common/nbsp/dpi](../src/rules/common/nbsp/dpi.js) | Non-breaking space before lpi, dpi | 1150 | | ✓ | | ||
| 54. | [common/punctuation/exclamation](../src/rules/common/punctuation/exclamation.js) | !! → ! | 1150 | | ✓ | | ||
| 55. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Removing repeat words | 1200 | | | | ||
| 56. | [ru/date/main](../src/rules/ru/date/main.js) | Converting dates YYYY-MM-DD type DD.MM.YYYY | 1300 | | ✓ | | ||
| 57. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 1300 | | ✓ | | ||
| 58. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 1310 | | ✓ | | ||
| 59. | [common/nbsp/nowrap](../src/rules/common/nbsp/nowrap.js) | Replace non-breaking space to normal space in tags nowrap and nobr | 1400 | | ✓ | | ||
| 60. | [common/html/mail](../src/rules/common/html/mail.js) | Placement of links for e-mail | 2000 | | | | ||
| 61. | [common/html/url](../src/rules/common/html/url.js) | Placement of links | 2010 | | | | ||
| 62. | [common/html/nbr](../src/rules/common/html/nbr.js) | Replacement line break on br tag | 2020 | | | | ||
| 63. | [common/html/pbr](../src/rules/common/html/pbr.js) | Placement of p and br tags | 2030 | | | | ||
| 1. | [common/nbsp/nowrap](../src/rules/common/nbsp/nowrap.js) | Replace non-breaking space to normal space in tags nowrap and nobr | 100 | start | ✓ | | ||
| 2. | [common/html/nbr](../src/rules/common/html/nbr.js) | Replacement line break on br tag | 110 | start | | | ||
| 3. | [common/sym/copy](../src/rules/common/sym/copy.js) | (c) → ©, (tm) → ©, (r) → ™ | 10 | | ✓ | | ||
| 4. | [common/punctuation/hellip](../src/rules/common/punctuation/hellip.js) | Three points on ellipsis | 20 | | ✓ | | ||
| 5. | [ru/dash/to](../src/rules/ru/dash/to.js) | Hyphen before “то, либо, нибудь” | 30 | | ✓ | | ||
| 6. | [ru/dash/kade](../src/rules/ru/dash/kade.js) | Hyphen before “ка, де, кась” | 31 | | ✓ | | ||
| 7. | [ru/dash/izza](../src/rules/ru/dash/izza.js) | Hyphen between “из-за” | 33 | | ✓ | | ||
| 8. | [ru/dash/izpod](../src/rules/ru/dash/izpod.js) | Hyphen between “из-под” | 35 | | ✓ | | ||
| 9. | [ru/dash/koe](../src/rules/ru/dash/koe.js) | Hyphen after “кое” and “кой” | 38 | | ✓ | | ||
| 10. | [ru/dash/taki](../src/rules/ru/dash/taki.js) | Hyphen between “верно-таки” and etc. | 39 | | ✓ | | ||
| 11. | [common/space/delLeadingBlanks](../src/rules/common/space/delLeadingBlanks.js) | Remove spaces at start of line | 504 | | | | ||
| 12. | [common/space/delTrailingBlanks](../src/rules/common/space/delTrailingBlanks.js) | Remove spaces at end of line | 505 | | ✓ | | ||
| 13. | [common/space/replaceTab](../src/rules/common/space/replaceTab.js) | Replacement of tab to 4 spaces | 510 | | ✓ | | ||
| 14. | [common/space/trimLeft](../src/rules/common/space/trimLeft.js) | Remove spaces and line breaks in beginning of text | 530 | | ✓ | | ||
| 15. | [common/space/trimRight](../src/rules/common/space/trimRight.js) | Remove spaces and line breaks at end of text | 535 | | ✓ | | ||
| 16. | [common/space/delRepeatSpace](../src/rules/common/space/delRepeatSpace.js) | Removing duplicate spaces between characters | 540 | | ✓ | | ||
| 17. | [common/space/delRepeatN](../src/rules/common/space/delRepeatN.js) | Remove duplicate line breaks (no more than two) | 545 | | ✓ | | ||
| 18. | [common/space/delBeforePunctuation](../src/rules/common/space/delBeforePunctuation.js) | Remove spaces before punctuation | 550 | | ✓ | | ||
| 19. | [common/space/afterPunctuation](../src/rules/common/space/afterPunctuation.js) | space after punctuation | 560 | | ✓ | | ||
| 20. | [ru/other/accent](../src/rules/ru/other/accent.js) | Replacing capital letter and adding accents | 560 | | | | ||
| 21. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Non-breaking space before “ли, ль, же, бы, б” | 570 | | ✓ | | ||
| 22. | [common/punctuation/delDoublePunctuation](../src/rules/common/punctuation/delDoublePunctuation.js) | Removing double punctuation | 580 | | ✓ | | ||
| 23. | [common/nbsp/afterShortWord](../src/rules/common/nbsp/afterShortWord.js) | Non-breaking space after short word | 590 | | ✓ | | ||
| 24. | [common/space/delBeforePercent](../src/rules/common/space/delBeforePercent.js) | Remove space before %, ‰ and ‱ | 600 | | ✓ | | ||
| 25. | [ru/dash/weekday](../src/rules/ru/dash/weekday.js) | Dash between the days of the week | 600 | | ✓ | | ||
| 26. | [ru/dash/month](../src/rules/ru/dash/month.js) | Dash between months | 610 | | ✓ | | ||
| 27. | [common/nbsp/afterPara](../src/rules/common/nbsp/afterPara.js) | Non-breaking space after § | 610 | | ✓ | | ||
| 28. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Non-breaking space before “стр., гл., рис., илл.” | 610 | | ✓ | | ||
| 29. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Non-breaking space after № | 610 | | ✓ | | ||
| 30. | [common/nbsp/afterNumber](../src/rules/common/nbsp/afterNumber.js) | Non-breaking space between number and word | 615 | | ✓ | | ||
| 31. | [common/nbsp/beforeShortLastWord](../src/rules/common/nbsp/beforeShortLastWord.js) | Non-breaking space before last short word in sentence | 620 | | ✓ | | ||
| 32. | [ru/dash/main](../src/rules/ru/dash/main.js) | Replacement hyphen with dash | 620 | | ✓ | | ||
| 33. | [ru/punctuation/quot](../src/rules/ru/punctuation/quot.js) | Placement of quotation marks | 700 | | ✓ | | ||
| 34. | [en/punctuation/quot](../src/rules/en/punctuation/quot.js) | Placement of quotation marks | 700 | | ✓ | | ||
| 35. | [ru/optalign/quot](../src/rules/ru/optalign/quot.js) | for opening quotation marks | 1000 | | | | ||
| 36. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | for opening bracket | 1001 | | | | ||
| 37. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | for comma | 1002 | | | | ||
| 38. | [common/number/plusMinus](../src/rules/common/number/plusMinus.js) | +- → ± | 1010 | | ✓ | | ||
| 39. | [common/sym/cf](../src/rules/common/sym/cf.js) | Adding ° to C and F | 1020 | | ✓ | | ||
| 40. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | m2 → м², m3 → м³ and non-breaking space | 1030 | | ✓ | | ||
| 41. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 1050 | | ✓ | | ||
| 42. | [ru/nbsp/xxxx](../src/rules/ru/nbsp/xxxx.js) | Non-breaking space before XXXX г. (2012 г.) | 1060 | | ✓ | | ||
| 43. | [ru/nbsp/yy](../src/rules/ru/nbsp/yy.js) | г.г. → гг. and non-breaking space | 1080 | | ✓ | | ||
| 44. | [ru/nbsp/cc](../src/rules/ru/nbsp/cc.js) | Remove spaces and extra points in centuries | 1090 | | ✓ | | ||
| 45. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Non-breaking space after “OOO, ОАО, ЗАО, НИИ, ПБОЮЛ” | 1100 | | ✓ | | ||
| 46. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Non-breaking space between number and month | 1105 | | ✓ | | ||
| 47. | [ru/nbsp/but](../src/rules/ru/nbsp/but.js) | Placement of commas and non-breaking space before “а” and “но” | 1110 | | ✓ | | ||
| 48. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Placement of non-breaking space after “г.”, “обл.”, “ул.”, “пр.”, “кв.” et al. | 1115 | | ✓ | | ||
| 49. | [common/number/fraction](../src/rules/common/number/fraction.js) | 1/2 → ½, 1/4 → ¼, 3/3 → ¾ | 1120 | | ✓ | | ||
| 50. | [common/sym/arrow](../src/rules/common/sym/arrow.js) | -> → →, <- → ← | 1130 | | ✓ | | ||
| 51. | [ru/money/euro](../src/rules/ru/money/euro.js) | €100 → 100 € | 1140 | | ✓ | | ||
| 52. | [ru/money/dollar](../src/rules/ru/money/dollar.js) | $100 → 100 $ | 1140 | | ✓ | | ||
| 53. | [common/punctuation/exclamationQuestion](../src/rules/common/punctuation/exclamationQuestion.js) | !? → ?! | 1140 | | ✓ | | ||
| 54. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 1145 | | | | ||
| 55. | [common/punctuation/exclamation](../src/rules/common/punctuation/exclamation.js) | !! → ! | 1150 | | ✓ | | ||
| 56. | [common/nbsp/dpi](../src/rules/common/nbsp/dpi.js) | Non-breaking space before lpi, dpi | 1150 | | ✓ | | ||
| 57. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Removing repeat words | 1200 | | | | ||
| 58. | [ru/date/main](../src/rules/ru/date/main.js) | Converting dates YYYY-MM-DD type DD.MM.YYYY | 1300 | | ✓ | | ||
| 59. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 1300 | | ✓ | | ||
| 60. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 1310 | | ✓ | | ||
| 61. | [common/html/mail](../src/rules/common/html/mail.js) | Placement of links for e-mail | 2000 | | | | ||
| 62. | [common/html/url](../src/rules/common/html/url.js) | Placement of links | 2010 | | | | ||
| 63. | [common/html/pbr](../src/rules/common/html/pbr.js) | Placement of p and br tags | 90 | end | | | ||
| 64. | [common/html/stripTags](../src/rules/common/html/stripTags.js) | Removing HTML-tags | 100 | end | | | ||
| 65. | [common/html/escape](../src/rules/common/html/escape.js) | Escaping HTML | 110 | end | | |
@@ -5,66 +5,66 @@ ## Правила типографа | ||
|--:|-------|----------|----------------------------:|:-------:|:----:| | ||
| 1. | [common/sym/copy](../src/rules/common/sym/copy.js) | (c) → ©, (tm) → ©, (r) → ™ | 10 | | ✓ | | ||
| 2. | [common/punctuation/hellip](../src/rules/common/punctuation/hellip.js) | Три точки на троеточие | 20 | | ✓ | | ||
| 3. | [ru/dash/to](../src/rules/ru/dash/to.js) | Дефис перед то, либо, нибудь | 30 | | ✓ | | ||
| 4. | [ru/dash/kade](../src/rules/ru/dash/kade.js) | Дефис перед ка, де, кась | 31 | | ✓ | | ||
| 5. | [ru/dash/izza](../src/rules/ru/dash/izza.js) | Дефис между из-за | 33 | | ✓ | | ||
| 6. | [ru/dash/izpod](../src/rules/ru/dash/izpod.js) | Дефис между из-под | 35 | | ✓ | | ||
| 7. | [ru/dash/koe](../src/rules/ru/dash/koe.js) | Дефис после кое и кой | 38 | | ✓ | | ||
| 8. | [ru/dash/taki](../src/rules/ru/dash/taki.js) | Дефис между верно-таки и т.д. | 39 | | ✓ | | ||
| 9. | [common/space/delLeadingBlanks](../src/rules/common/space/delLeadingBlanks.js) | Удаление пробелов в начале строки | 504 | | | | ||
| 10. | [common/space/delTrailingBlanks](../src/rules/common/space/delTrailingBlanks.js) | Удаление пробелов в конце строки | 505 | | ✓ | | ||
| 11. | [common/space/replaceTab](../src/rules/common/space/replaceTab.js) | Замена таба на 4 пробела | 510 | | ✓ | | ||
| 12. | [common/space/trimLeft](../src/rules/common/space/trimLeft.js) | Удаление пробелов и переносов строк в начале текста | 530 | | ✓ | | ||
| 13. | [common/space/trimRight](../src/rules/common/space/trimRight.js) | Удаление пробелов и переносов строк в конце текста | 535 | | ✓ | | ||
| 14. | [common/space/delRepeatSpace](../src/rules/common/space/delRepeatSpace.js) | Удаление повторяющихся пробелов между символами | 540 | | ✓ | | ||
| 15. | [common/space/delRepeatN](../src/rules/common/space/delRepeatN.js) | Удаление повторяющихся переносов строки (не более двух) | 545 | | ✓ | | ||
| 16. | [common/space/delBeforePunctuation](../src/rules/common/space/delBeforePunctuation.js) | Удаление пробелов перед знаками пунктуации | 550 | | ✓ | | ||
| 17. | [common/space/afterPunctuation](../src/rules/common/space/afterPunctuation.js) | Пробел после знаков пунктуации | 560 | | ✓ | | ||
| 18. | [ru/other/accent](../src/rules/ru/other/accent.js) | Замена заглавной буквы и добавление знака ударения | 560 | | | | ||
| 19. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Нераз. пробел перед ли, ль, же, бы, б | 570 | | ✓ | | ||
| 20. | [common/punctuation/delDoublePunctuation](../src/rules/common/punctuation/delDoublePunctuation.js) | Удаление двойной пунктуации | 580 | | ✓ | | ||
| 21. | [common/nbsp/afterShortWord](../src/rules/common/nbsp/afterShortWord.js) | Нераз. пробел после короткого слова | 590 | | ✓ | | ||
| 22. | [common/space/delBeforePercent](../src/rules/common/space/delBeforePercent.js) | Удаление пробела перед %, ‰ и ‱ | 600 | | ✓ | | ||
| 23. | [ru/dash/weekday](../src/rules/ru/dash/weekday.js) | Тире между днями недели | 600 | | ✓ | | ||
| 24. | [ru/dash/month](../src/rules/ru/dash/month.js) | Тире между месяцами | 610 | | ✓ | | ||
| 25. | [common/nbsp/afterPara](../src/rules/common/nbsp/afterPara.js) | Нераз. пробел после § | 610 | | ✓ | | ||
| 26. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Нераз. пробел после № | 610 | | ✓ | | ||
| 27. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Нераз. пробел перед стр., гл., рис., илл. | 610 | | ✓ | | ||
| 28. | [common/nbsp/afterNumber](../src/rules/common/nbsp/afterNumber.js) | Нераз. пробел между числом и словом | 615 | | ✓ | | ||
| 29. | [ru/dash/main](../src/rules/ru/dash/main.js) | Дефис на тире | 620 | | ✓ | | ||
| 30. | [common/nbsp/beforeShortLastWord](../src/rules/common/nbsp/beforeShortLastWord.js) | Нераз. пробел перед последним коротким словом в предложении | 620 | | ✓ | | ||
| 31. | [ru/punctuation/quot](../src/rules/ru/punctuation/quot.js) | Расстановка кавычек | 700 | | ✓ | | ||
| 32. | [en/punctuation/quot](../src/rules/en/punctuation/quot.js) | Расстановка кавычек | 700 | | ✓ | | ||
| 33. | [ru/optalign/quot](../src/rules/ru/optalign/quot.js) | для открывающей кавычки | 1000 | | | | ||
| 34. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | для открывающей скобки | 1001 | | | | ||
| 35. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | для запятой | 1002 | | | | ||
| 36. | [common/number/plusMinus](../src/rules/common/number/plusMinus.js) | +- → ± | 1010 | | ✓ | | ||
| 37. | [common/sym/cf](../src/rules/common/sym/cf.js) | Добавление ° к C и F | 1020 | | ✓ | | ||
| 38. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | m2 → м², m3 → м³ и нераз. пробел | 1030 | | ✓ | | ||
| 39. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 1050 | | ✓ | | ||
| 40. | [ru/nbsp/xxxx](../src/rules/ru/nbsp/xxxx.js) | Нераз. пробел после XXXX г. (2012 г.) | 1060 | | ✓ | | ||
| 41. | [ru/nbsp/yy](../src/rules/ru/nbsp/yy.js) | г.г. → гг. и нераз. пробел | 1080 | | ✓ | | ||
| 42. | [ru/nbsp/cc](../src/rules/ru/nbsp/cc.js) | Удаление пробелов и лишних точек в вв. | 1090 | | ✓ | | ||
| 43. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Нераз. пробел после OOO, ОАО, ЗАО, НИИ и ПБОЮЛ | 1100 | | ✓ | | ||
| 44. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Нераз. пробел между числом и месяцем | 1105 | | ✓ | | ||
| 45. | [ru/nbsp/but](../src/rules/ru/nbsp/but.js) | Расстановка запятых и неразрывного пробела перед а и но | 1110 | | ✓ | | ||
| 46. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Расстановка неразрывного пробела после «г.», «обл.», «ул.», «пр.», «кв.» и др. | 1115 | | ✓ | | ||
| 47. | [common/number/fraction](../src/rules/common/number/fraction.js) | 1/2 → ½, 1/4 → ¼, 3/3 → ¾ | 1120 | | ✓ | | ||
| 48. | [common/sym/arrow](../src/rules/common/sym/arrow.js) | -> → →, <- → ← | 1130 | | ✓ | | ||
| 49. | [common/punctuation/exclamationQuestion](../src/rules/common/punctuation/exclamationQuestion.js) | !? → ?! | 1140 | | ✓ | | ||
| 50. | [ru/money/euro](../src/rules/ru/money/euro.js) | €100 → 100 € | 1140 | | ✓ | | ||
| 51. | [ru/money/dollar](../src/rules/ru/money/dollar.js) | $100 → 100 $ | 1140 | | ✓ | | ||
| 52. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 1145 | | | | ||
| 53. | [common/nbsp/dpi](../src/rules/common/nbsp/dpi.js) | Нераз. пробел перед lpi, dpi | 1150 | | ✓ | | ||
| 54. | [common/punctuation/exclamation](../src/rules/common/punctuation/exclamation.js) | !! → ! | 1150 | | ✓ | | ||
| 55. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Удаление повтора слова | 1200 | | | | ||
| 56. | [ru/date/main](../src/rules/ru/date/main.js) | Преобразование дат YYYY-MM-DD к виду DD.MM.YYYY | 1300 | | ✓ | | ||
| 57. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 1300 | | ✓ | | ||
| 58. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 1310 | | ✓ | | ||
| 59. | [common/nbsp/nowrap](../src/rules/common/nbsp/nowrap.js) | Заменять нераз. пробел на обычный пробел в тегах nowrap и nobr | 1400 | | ✓ | | ||
| 60. | [common/html/mail](../src/rules/common/html/mail.js) | Расстановка ссылок для эл. почты | 2000 | | | | ||
| 61. | [common/html/url](../src/rules/common/html/url.js) | Расстановка ссылок | 2010 | | | | ||
| 62. | [common/html/nbr](../src/rules/common/html/nbr.js) | Замена перевода строки на тег br | 2020 | | | | ||
| 63. | [common/html/pbr](../src/rules/common/html/pbr.js) | Расстановка тегов p и br | 2030 | | | | ||
| 1. | [common/nbsp/nowrap](../src/rules/common/nbsp/nowrap.js) | Заменять нераз. пробел на обычный пробел в тегах nowrap и nobr | 100 | start | ✓ | | ||
| 2. | [common/html/nbr](../src/rules/common/html/nbr.js) | Замена перевода строки на тег br | 110 | start | | | ||
| 3. | [common/sym/copy](../src/rules/common/sym/copy.js) | (c) → ©, (tm) → ©, (r) → ™ | 10 | | ✓ | | ||
| 4. | [common/punctuation/hellip](../src/rules/common/punctuation/hellip.js) | Три точки на троеточие | 20 | | ✓ | | ||
| 5. | [ru/dash/to](../src/rules/ru/dash/to.js) | Дефис перед то, либо, нибудь | 30 | | ✓ | | ||
| 6. | [ru/dash/kade](../src/rules/ru/dash/kade.js) | Дефис перед ка, де, кась | 31 | | ✓ | | ||
| 7. | [ru/dash/izza](../src/rules/ru/dash/izza.js) | Дефис между из-за | 33 | | ✓ | | ||
| 8. | [ru/dash/izpod](../src/rules/ru/dash/izpod.js) | Дефис между из-под | 35 | | ✓ | | ||
| 9. | [ru/dash/koe](../src/rules/ru/dash/koe.js) | Дефис после кое и кой | 38 | | ✓ | | ||
| 10. | [ru/dash/taki](../src/rules/ru/dash/taki.js) | Дефис между верно-таки и т.д. | 39 | | ✓ | | ||
| 11. | [common/space/delLeadingBlanks](../src/rules/common/space/delLeadingBlanks.js) | Удаление пробелов в начале строки | 504 | | | | ||
| 12. | [common/space/delTrailingBlanks](../src/rules/common/space/delTrailingBlanks.js) | Удаление пробелов в конце строки | 505 | | ✓ | | ||
| 13. | [common/space/replaceTab](../src/rules/common/space/replaceTab.js) | Замена таба на 4 пробела | 510 | | ✓ | | ||
| 14. | [common/space/trimLeft](../src/rules/common/space/trimLeft.js) | Удаление пробелов и переносов строк в начале текста | 530 | | ✓ | | ||
| 15. | [common/space/trimRight](../src/rules/common/space/trimRight.js) | Удаление пробелов и переносов строк в конце текста | 535 | | ✓ | | ||
| 16. | [common/space/delRepeatSpace](../src/rules/common/space/delRepeatSpace.js) | Удаление повторяющихся пробелов между символами | 540 | | ✓ | | ||
| 17. | [common/space/delRepeatN](../src/rules/common/space/delRepeatN.js) | Удаление повторяющихся переносов строки (не более двух) | 545 | | ✓ | | ||
| 18. | [common/space/delBeforePunctuation](../src/rules/common/space/delBeforePunctuation.js) | Удаление пробелов перед знаками пунктуации | 550 | | ✓ | | ||
| 19. | [common/space/afterPunctuation](../src/rules/common/space/afterPunctuation.js) | Пробел после знаков пунктуации | 560 | | ✓ | | ||
| 20. | [ru/other/accent](../src/rules/ru/other/accent.js) | Замена заглавной буквы и добавление знака ударения | 560 | | | | ||
| 21. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Нераз. пробел перед ли, ль, же, бы, б | 570 | | ✓ | | ||
| 22. | [common/punctuation/delDoublePunctuation](../src/rules/common/punctuation/delDoublePunctuation.js) | Удаление двойной пунктуации | 580 | | ✓ | | ||
| 23. | [common/nbsp/afterShortWord](../src/rules/common/nbsp/afterShortWord.js) | Нераз. пробел после короткого слова | 590 | | ✓ | | ||
| 24. | [common/space/delBeforePercent](../src/rules/common/space/delBeforePercent.js) | Удаление пробела перед %, ‰ и ‱ | 600 | | ✓ | | ||
| 25. | [ru/dash/weekday](../src/rules/ru/dash/weekday.js) | Тире между днями недели | 600 | | ✓ | | ||
| 26. | [ru/dash/month](../src/rules/ru/dash/month.js) | Тире между месяцами | 610 | | ✓ | | ||
| 27. | [common/nbsp/afterPara](../src/rules/common/nbsp/afterPara.js) | Нераз. пробел после § | 610 | | ✓ | | ||
| 28. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Нераз. пробел перед стр., гл., рис., илл. | 610 | | ✓ | | ||
| 29. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Нераз. пробел после № | 610 | | ✓ | | ||
| 30. | [common/nbsp/afterNumber](../src/rules/common/nbsp/afterNumber.js) | Нераз. пробел между числом и словом | 615 | | ✓ | | ||
| 31. | [common/nbsp/beforeShortLastWord](../src/rules/common/nbsp/beforeShortLastWord.js) | Нераз. пробел перед последним коротким словом в предложении | 620 | | ✓ | | ||
| 32. | [ru/dash/main](../src/rules/ru/dash/main.js) | Дефис на тире | 620 | | ✓ | | ||
| 33. | [ru/punctuation/quot](../src/rules/ru/punctuation/quot.js) | Расстановка кавычек | 700 | | ✓ | | ||
| 34. | [en/punctuation/quot](../src/rules/en/punctuation/quot.js) | Расстановка кавычек | 700 | | ✓ | | ||
| 35. | [ru/optalign/quot](../src/rules/ru/optalign/quot.js) | для открывающей кавычки | 1000 | | | | ||
| 36. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | для открывающей скобки | 1001 | | | | ||
| 37. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | для запятой | 1002 | | | | ||
| 38. | [common/number/plusMinus](../src/rules/common/number/plusMinus.js) | +- → ± | 1010 | | ✓ | | ||
| 39. | [common/sym/cf](../src/rules/common/sym/cf.js) | Добавление ° к C и F | 1020 | | ✓ | | ||
| 40. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | m2 → м², m3 → м³ и нераз. пробел | 1030 | | ✓ | | ||
| 41. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 1050 | | ✓ | | ||
| 42. | [ru/nbsp/xxxx](../src/rules/ru/nbsp/xxxx.js) | Нераз. пробел после XXXX г. (2012 г.) | 1060 | | ✓ | | ||
| 43. | [ru/nbsp/yy](../src/rules/ru/nbsp/yy.js) | г.г. → гг. и нераз. пробел | 1080 | | ✓ | | ||
| 44. | [ru/nbsp/cc](../src/rules/ru/nbsp/cc.js) | Удаление пробелов и лишних точек в вв. | 1090 | | ✓ | | ||
| 45. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Нераз. пробел после OOO, ОАО, ЗАО, НИИ и ПБОЮЛ | 1100 | | ✓ | | ||
| 46. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Нераз. пробел между числом и месяцем | 1105 | | ✓ | | ||
| 47. | [ru/nbsp/but](../src/rules/ru/nbsp/but.js) | Расстановка запятых и неразрывного пробела перед а и но | 1110 | | ✓ | | ||
| 48. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Расстановка неразрывного пробела после «г.», «обл.», «ул.», «пр.», «кв.» и др. | 1115 | | ✓ | | ||
| 49. | [common/number/fraction](../src/rules/common/number/fraction.js) | 1/2 → ½, 1/4 → ¼, 3/3 → ¾ | 1120 | | ✓ | | ||
| 50. | [common/sym/arrow](../src/rules/common/sym/arrow.js) | -> → →, <- → ← | 1130 | | ✓ | | ||
| 51. | [ru/money/euro](../src/rules/ru/money/euro.js) | €100 → 100 € | 1140 | | ✓ | | ||
| 52. | [ru/money/dollar](../src/rules/ru/money/dollar.js) | $100 → 100 $ | 1140 | | ✓ | | ||
| 53. | [common/punctuation/exclamationQuestion](../src/rules/common/punctuation/exclamationQuestion.js) | !? → ?! | 1140 | | ✓ | | ||
| 54. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 1145 | | | | ||
| 55. | [common/punctuation/exclamation](../src/rules/common/punctuation/exclamation.js) | !! → ! | 1150 | | ✓ | | ||
| 56. | [common/nbsp/dpi](../src/rules/common/nbsp/dpi.js) | Нераз. пробел перед lpi, dpi | 1150 | | ✓ | | ||
| 57. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Удаление повтора слова | 1200 | | | | ||
| 58. | [ru/date/main](../src/rules/ru/date/main.js) | Преобразование дат YYYY-MM-DD к виду DD.MM.YYYY | 1300 | | ✓ | | ||
| 59. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 1300 | | ✓ | | ||
| 60. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 1310 | | ✓ | | ||
| 61. | [common/html/mail](../src/rules/common/html/mail.js) | Расстановка ссылок для эл. почты | 2000 | | | | ||
| 62. | [common/html/url](../src/rules/common/html/url.js) | Расстановка ссылок | 2010 | | | | ||
| 63. | [common/html/pbr](../src/rules/common/html/pbr.js) | Расстановка тегов p и br | 90 | end | | | ||
| 64. | [common/html/stripTags](../src/rules/common/html/stripTags.js) | Удаление HTML-тегов | 100 | end | | | ||
| 65. | [common/html/escape](../src/rules/common/html/escape.js) | Экранирование HTML | 110 | end | | |
{ | ||
"name": "typograf", | ||
"description": "The client and server typographer", | ||
"version": "2.11.0", | ||
"version": "2.11.1", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Denis Seleznev", |
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
135108
2032