diff --git a/.husky/pre-commit b/.husky/pre-commit index 04160d2..fb4f48f 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,3 +1,10 @@ +# Update the version in typopo.js before committing +gulp updateTypopoJsCopyrightBanner + +# Add updated files to the commit +git add src/typopo.js + +# run build pnpm build # Add dist folder to the commit diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ba77d5..c3451df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### 🔨 Maintenance - Add a build automation +- Automate copyright notice updates in source and dist files diff --git a/dist/typopo.min.js b/dist/typopo.min.js index 0fd25a1..013ad84 100644 --- a/dist/typopo.min.js +++ b/dist/typopo.min.js @@ -1 +1,6 @@ +/*! + * Typopo v2.5.7 (https://typopo.org) + * Copyright 2015–2024 Braňo Šandala (https://brano.me) + * Licensed under MIT (https://github.com/surfinzap/typopo/blob/main/LICENSE.txt) + */ !function r(s,a,i){function o(n,e){if(!a[n]){if(!s[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(p)return p(n,!0);throw(e=new Error("Cannot find module '"+n+"'")).code="MODULE_NOT_FOUND",e}t=a[n]={exports:{}},s[n][0].call(t.exports,function(e){return o(s[n][1][e]||e)},t,t.exports,r,s,a,i)}return a[n].exports}for(var p="function"==typeof require&&require,e=0;e{var t="(\\(c\\))(["+n.spaces+"]?)("+n.cardinalNumber+")",t=new RegExp(t,"gi"),n=n.copyright+"$2$3";return e.replace(t,n)})(e,n),e=(0,r.addSpaceBeforeSymbol)(e,n,n.copyright),e=(0,s.addNbspAfterSymbol)(e,n,n.copyright),e=(0,s.replaceSpacesWithNbspAfterSymbol)(e,n,n.copyright)};var r=e("../whitespace/spaces"),s=e("../whitespace/nbsp")},{"../whitespace/nbsp":19,"../whitespace/spaces":20}],10:[function(e,n,t){function r(e,n,t,r){n="(["+n.spaces+n.slash+"])(m|dam|hm|km|Mm|Gm|Tm|Pm|Em|Zm|Ym|m|dm|cm|mm|µm|nm|pm|fm|am|zm|ym)("+t+")",t=new RegExp(n,"g");return e.replace(t,"$1$2"+r)}function s(e,n){return r(e,n,"2","²")}function a(e,n){return r(e,n,"3","³")}Object.defineProperty(t,"__esModule",{value:!0}),t.fixCubes=a,t.fixExponents=function(e,n){return e=a(e=s(e,n),n)},t.fixSquares=s},{}],11:[function(e,n,t){function r(e,n){var t="(["+n.cardinalNumber+"]+)(["+n.spaces+"]?["+n.lowercaseChars+n.singlePrime+n.doublePrime+"]*)(["+n.spaces+"][x]["+n.spaces+"])(["+n.cardinalNumber+"]+)(["+n.spaces+"]?["+n.lowercaseChars+n.singlePrime+n.doublePrime+"]*)",t=new RegExp(t,"gi"),n="$1$2"+n.nbsp+n.multiplicationSign+n.nbsp+"$4$5";return e=(e=e.replace(t,n)).replace(t,n)}function s(e,n){var t="(["+n.allChars+"]+)(["+n.spaces+"][x]["+n.spaces+"])(["+n.allChars+"]+)",t=new RegExp(t,"g"),n="$1"+n.nbsp+n.multiplicationSign+n.nbsp+"$3";return e=(e=e.replace(t,n)).replace(t,n)}function a(e,i){var n="(["+i.cardinalNumber+"])(["+i.spaces+"]?)([x|×])(["+i.spaces+"])(["+i.lowercaseChars+"]+)",n=new RegExp(n,"gi");return e=e.replace(n,function(e,n,t,r,s,a){return""==t?n+t+i.multiplicationSign+i.nbsp+a:n+i.nbsp+i.multiplicationSign+i.nbsp+a})}function i(e,n){var t="(["+n.cardinalNumber+"]+)(["+n.singlePrime+n.doublePrime+"])?([x|×])(["+n.cardinalNumber+"]+)(["+n.singlePrime+n.doublePrime+"])?",t=new RegExp(t,"gi"),n="$1$2"+n.nbsp+n.multiplicationSign+n.nbsp+"$4$5";return e.replace(t,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.fixMultiplicationSign=function(e,n){return e=i(e=a(e=s(e=r(e,n),n),n),n)},t.fixMultiplicationSignBetweenNumberAndWord=a,t.fixMultiplicationSignBetweenNumbers=r,t.fixMultiplicationSignBetweenWords=s,t.fixNbspAroundMultiplicationSign=i},{}],12:[function(e,n,t){function r(e,n){return e.replace(new RegExp("(["+n.spaces+"]+)("+n.numberSign+")(["+n.spaces+"]+)("+n.cardinalNumber+")","g"),"$1$2$4")}Object.defineProperty(t,"__esModule",{value:!0}),t.fixNumberSign=function(e,n){return e=r(e,n)},t.removeExtraSpacesAfterNumberSign=r},{}],13:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixPlusMinus=function(e,n){var t=new RegExp("(\\+\\-)|(\\-\\+)","g"),n=n.plusMinus;return e.replace(t,n)}},{}],14:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixRegisteredTrademark=function(e,n){return e=((e,n)=>{var t="([^0-9]|^)(["+n.spaces+"]*)(\\(r\\)|"+n.registeredTrademark+")",t=new RegExp(t,"gi"),n="$1"+n.registeredTrademark;return e.replace(t,n)})(e,n)}},{}],15:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixSectionSign=function(e,n){return e=((e,n)=>{var t="("+n.sectionSign+")(["+n.spaces+"])",t=new RegExp(t,"g"),n="$1"+n.nbsp;return e.replace(t,n)})(e=((e,n)=>{var t="("+n.sectionSign+")([^"+n.spaces+n.sectionSign+"])",t=new RegExp(t,"g"),n="$1"+n.nbsp+"$2";return e.replace(t,n)})(e=((e,n)=>{var t="([^"+n.spaces+n.sectionSign+n.openingBrackets+"])("+n.sectionSign+")",t=new RegExp(t,"g"),n="$1"+n.space+"$2";return e.replace(t,n)})(e,n),n),n)}},{}],16:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixSoundRecordingCopyright=function(e,n){return e=((e,n)=>{var t="(\\(p\\))(["+n.spaces+"]?)("+n.cardinalNumber+")",t=new RegExp(t,"gi"),n=n.soundRecordingCopyright+"$2$3";return e.replace(t,n)})(e,n),e=(0,r.addSpaceBeforeSymbol)(e,n,n.soundRecordingCopyright),e=(0,s.addNbspAfterSymbol)(e,n,n.soundRecordingCopyright),e=(0,s.replaceSpacesWithNbspAfterSymbol)(e,n,n.soundRecordingCopyright)};var r=e("../whitespace/spaces"),s=e("../whitespace/nbsp")},{"../whitespace/nbsp":19,"../whitespace/spaces":20}],17:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixTrademark=function(e,n){return e=((e,n)=>{var t="(["+n.spaces+"]*)(\\(tm\\)|"+n.trademark+")",t=new RegExp(t,"gi"),n=n.trademark;return e.replace(t,n)})(e,n)}},{}],18:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.removeEmptyLines=function(e){return e.replace(/[\n\r]{2,}/gm,"\n")}},{}],19:[function(e,n,t){function r(e,n){n="(["+n.lowercaseChars+n.uppercaseChars+"]{2,})(["+n.nbsp+n.narrowNbsp+"])(["+n.lowercaseChars+n.uppercaseChars+"]{2,})",n=new RegExp(n,"g");return e=(e=e.replace(n,"$1 $3")).replace(n,"$1 $3")}function s(e,n){var t="(^|["+n.space+"]|[^"+n.allChars+n.cardinalNumber+n.apostrophe+n.plus+n.minus+n.hyphen+"])(["+n.lowercaseChars+"])(["+n.space+"])",r=new RegExp(t,"g"),s="$1$2"+n.nbsp;return e=(e=e.replace(r,s)).replace(r,s),t="(^|["+n.sentencePunctuation+n.ellipsis+n.copyright+n.registeredTrademark+n.soundRecordingCopyright+"])(["+n.spaces+"]?)(["+n.uppercaseChars+"])(["+n.spaces+"])",r=new RegExp(t,"g"),s="$1$2$3"+n.nbsp,e=e.replace(r,s),e="en-us"==n.locale?e.replace(new RegExp("(^|["+n.spaces+"])(I)(["+n.spaces+"])","g"),"$1$2"+n.nbsp):e}function a(e,n){var t="(["+n.spaces+"])("+n.ampersand+")(["+n.spaces+"])",t=new RegExp(t,"g"),n=" $2"+n.nbsp;return e.replace(t,n)}function i(e,n){return e.replace(new RegExp("([^"+n.nbsp+n.cardinalNumber+"]|^)("+n.cardinalNumber+"{1,2})(["+n.spaces+"])(["+n.allChars+"])","g"),"$1$2"+n.nbsp+"$4")}function o(e,n){return e.replace(new RegExp("([^"+n.nbsp+n.cardinalNumber+"_%\\-]|^)("+n.cardinalNumber+"{1,2})("+n.ordinalIndicator+")(["+n.spaces+"]?)(["+n.allChars+"])","g"),"$1$2$3"+n.nbsp+"$5")}function p(e,n){var t="("+n.cardinalNumber+")("+n.ordinalIndicator+")(["+n.spaces+"]?)("+n.cardinalNumber+")("+n.ordinalIndicator+")(["+n.spaces+"]?)("+n.cardinalNumber+")",t=new RegExp(t,"g"),r="";switch(n.locale){case"en-us":case"rue":case"sk":case"cs":r="$1$2"+n.nbsp+"$4$5"+n.nbsp+"$7";break;case"de-de":r="$1$2"+n.nbsp+"$4$5"+n.space+"$7"}return e.replace(t,r)}function l(e,n){var t;return""!=n.romanOrdinalIndicator?(t="(\\b)(["+n.romanNumerals+"]+)("+n.romanOrdinalIndicator+")(["+n.spaces+"]?)(["+n.allChars+n.cardinalNumber+"])",t=new RegExp(t,"g"),n="$1$2$3"+n.nbsp+"$5",e.replace(t,n)):e}function u(e,i){var n="(\\b["+i.uppercaseChars+"]["+i.lowercaseChars+"]+?)(["+i.spaces+"])(["+i.romanNumerals+"]+\\b)("+i.romanOrdinalIndicator+")(["+i.nbsp+"]?)",n=new RegExp(n,"g");return e.replace(n,function(e,n,t,r,s,a){return""==a&&"I"==r?n+i.space+r+s:""==a&&"I"!=r?n+i.nbsp+r+s:a==i.nbsp&&"I"==r?n+i.space+r+s+a:n+i.nbsp+r+s+i.space})}function c(e,n){var t="(["+n.spaces+"])(["+n.percent+n.permille+n.permyriad+"])",t=new RegExp(t,"g"),n=n.nbsp+"$2";return e.replace(t,n)}function d(e,i){var n=i.uppercaseChars;"en-us"==i.locale&&(n=n.replace(/A-Z/g,"A-HJ-Z"));n=new RegExp("([^"+i.sentencePunctuation+i.ellipsis+i.closingBrackets+i.rightDoubleQuote+i.rightSingleQuote+i.apostrophe+i.multiplicationSign+i.emDash+i.enDash+"])(["+i.spaces+"])(["+n+"])((["+i.spaces+"])|(\\.$|$))","g");return e.replace(n,function(e,n,t,r,s,a){return"en-us"==i.locale||"I"!=r||a!=i.nbsp&&a!=i.hairSpace&&a!=i.narrowNbsp?n+i.nbsp+r+s:n+i.nbsp+r+i.space})}Object.defineProperty(t,"__esModule",{value:!0}),t.addNbspAfterAmpersand=a,t.addNbspAfterCardinalNumber=i,t.addNbspAfterOrdinalNumber=o,t.addNbspAfterPreposition=s,t.addNbspAfterRomanNumeral=l,t.addNbspAfterSymbol=function(e,n,t){t="("+t+")([^"+n.spaces+"])",t=new RegExp(t,"g"),n="$1"+n.nbsp+"$2";return e.replace(t,n)},t.addNbspBeforePercent=c,t.addNbspBeforeSingleLetter=d,t.addNbspWithinOrdinalDate=p,t.fixNbsp=function(e,n){return e=c(e=u(e=d(e=l(e=p(e=o(e=i(e=a(e=s(e=r(e,n),n),n),n),n),n),n),n),n),n)},t.fixNbspForNameWithRegnalNumber=u,t.removeNbspBetweenMultiCharWords=r,t.replaceSpacesWithNbspAfterSymbol=function(e,n,t){t="("+t+")(["+n.spaces+"])",t=new RegExp(t,"g"),n="$1"+n.nbsp;return e.replace(t,n)}},{}],20:[function(e,n,t){function r(e,n){n="(\\S)(["+n.spaces+"]{2,})(\\S)",n=new RegExp(n,"g");return e.replace(n,"$1 $3")}function s(e,n,r){for(var t=e.split(/\r?\n/),s=new RegExp("(^\\s+)([-\\*\\+]*)","g"),a=0;an.reduce(function(e,n,t){t="{{typopo__exception-".concat(t,"}}");return e.replace(n,t)},e))(e,t),exceptions:t}},t.placeExceptions=function(e,n){return n.reduce(function(e,n,t){t=new RegExp("{{typopo__exception-".concat(t,"}}"),"g");return e.replace(t,n)},e)}},{}],24:[function(e,n,t){function r(e,n){var t="(issn)(:?)(["+n.spaces+"]?)(\\d{4})(["+n.spaces+"]?["+n.hyphen+n.enDash+n.emDash+"]["+n.spaces+"]?)(\\d{4})",t=new RegExp(t,"gi"),n="ISSN$2"+n.nbsp+"$4-$6";return e.replace(t,n)}function s(e,n){var t="(["+n.spaces+"]?["+n.hyphen+n.enDash+n.emDash+"]["+n.spaces+"]?)",t=new RegExp("(isbn)(:?)(["+n.spaces+"]?)(\\d+)"+t+"(\\d+)"+t+"(\\d+)"+t+"(X|\\d+)","gi"),n="ISBN$2"+n.nbsp+"$4-$6-$8-$10";return e.replace(t,n)}function a(e,n){var t="(["+n.spaces+"]?["+n.hyphen+n.enDash+n.emDash+"]["+n.spaces+"]?)",t=new RegExp("(isbn)(:?)(["+n.spaces+"]?)(\\d+)"+t+"(\\d+)"+t+"(\\d+)"+t+"(\\d+)"+t+"(X|\\d+)","gi"),n="ISBN$2"+n.nbsp+"$4-$6-$8-$10-$12";return e.replace(t,n)}function i(e,n){n="(["+n.spaces+"]?["+n.hyphen+n.enDash+n.emDash+"]["+n.spaces+"]?)",n=new RegExp("(\\d+)"+n+"(\\d+)"+n+"(\\d+)"+n+"(\\d+)"+n+"(X|\\d+?)","g");return e.replace(n,"$1-$3-$5-$7-$9")}Object.defineProperty(t,"__esModule",{value:!0}),t.fixISBN10=s,t.fixISBN13=a,t.fixISBNnumber=i,t.fixISSN=r,t.fixPubId=function(e,n){return e=i(e=a(e=s(e=r(e,n),n),n),n)}},{}],25:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={quotes:{leftDoubleQuote:"„",rightDoubleQuote:"“",leftSingleQuote:"‚",rightSingleQuote:"‘"},numbers:{ordinalIndicator:"\\.",romanOrdinalIndicator:"\\."},singleWordAbbreviations:["č","s","fol","str","r","par","odst","např","sv","tj","tzv"],multipleWordAbbreviations:["hl m","n l","p n l","př n l"]}},{}],26:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={quotes:{leftDoubleQuote:"„",rightDoubleQuote:"“",leftSingleQuote:"‚",rightSingleQuote:"‘"},numbers:{ordinalIndicator:"\\.",romanOrdinalIndicator:"\\."},singleWordAbbreviations:["S","z","St","Stk","Mo","Di","Mi","Do","Fr","Sa","So","Bhf","Hbf","Nr","ca","usw","geb","gest","u"],multipleWordAbbreviations:["b w","d h","d i","e V","n Chr","s a","s o","s u","u a","u ä","u Ä","u dgl","u U","u z","u zw","v a","v Chr","z B","z T","z Zt","n u Z","u a m","v u Z","Ges m b H"]}},{}],27:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={quotes:{leftDoubleQuote:"“",rightDoubleQuote:"”",leftSingleQuote:"‘",rightSingleQuote:"’"},numbers:{ordinalIndicator:"st|nd|rd|th",romanOrdinalIndicator:""},singleWordAbbreviations:["p","pp","no","vol"],multipleWordAbbreviations:["U S","e g","i e","a m","p m"]}},{}],28:[function(e,n,t){function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(e("./cs")),a=p(e("./en-us")),i=p(e("./rue")),o=p(e("./sk")),e=p(e("./de-de"));function p(e){return e&&e.__esModule?e:{default:e}}function l(e,n){for(var t=0;t(e=((e,n)=>{if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return("string"===n?String:Number)(e);if("object"!=s(t=t.call(e,n||"default")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==s(e)?e:e+""))(r.key),r)}}function u(e,n,t){return n&&l(e.prototype,n),t&&l(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var c={cs:r.default,"en-us":a.default,rue:i.default,sk:o.default,"de-de":e.default};t.default=u(function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");for(n in this.locale=n,this.nonLatinLowercase="áäčďéěíĺľňóôöőŕřšťúüűůýŷžабвгґдезіийклмнопрстуфъыьцчжшїщёєюях",this.nonLatinUppercase="ÁÄČĎÉĚÍĹĽŇÓÔÖŐŔŘŠŤÚÜŰŮÝŶŽАБВГҐДЕЗІИЙКЛМНОПРСТУФЪЫЬЦЧЖШЇЩЁЄЮЯХ",this.nonLatinChars=this.nonLatinLowercase+this.nonLatinUppercase,this.lowercaseChars="a-z"+this.nonLatinLowercase,this.uppercaseChars="A-Z"+this.nonLatinUppercase,this.allChars=this.lowercaseChars+this.uppercaseChars,this.singleQuoteAdepts="‚|'|‘|’|ʼ|‛|´|`|′|‹|›",this.leftSingleQuote=c[n].quotes.leftSingleQuote,this.rightSingleQuote=c[n].quotes.rightSingleQuote,this.apostrophe="’",this.singlePrime="′",this.backtick="`",this.doubleQuoteAdepts="„|“|”|\"|«|»|″|,{2,}|‘{2,}|’{2,}|'{2,}|‹{2,}|›{2,}|′{2,}|´{2,}|`{2,}",this.leftDoubleQuote=c[n].quotes.leftDoubleQuote,this.rightDoubleQuote=c[n].quotes.rightDoubleQuote,this.doublePrime="″",this.space=" ",this.nbsp=" ",this.hairSpace=" ",this.narrowNbsp=" ",this.spaces=this.space+this.nbsp+this.hairSpace+this.narrowNbsp,this.terminalPunctuation="\\.\\!\\?",this.terminalQuotes=this.rightSingleQuote+this.rightDoubleQuote,this.sentencePausePunctuation="\\,\\:\\;",this.sentencePunctuation=this.sentencePausePunctuation+this.terminalPunctuation,this.openingBrackets="\\(\\[\\{",this.closingBrackets="\\)\\]\\}",this.ellipsis="…",this.hyphen="-",this.enDash="–",this.emDash="—",this.slash="/",this.degree="°",this.multiplicationSign="×",this.ampersand="&",this.sectionSign="§",this.copyright="©",this.registeredTrademark="®",this.soundRecordingCopyright="℗",this.trademark="™",this.plus="+",this.minus="−",this.plusMinus="±",this.percent="%",this.permille="‰",this.permyriad="‱",this.numberSign="#",this.urlPattern="((?:(http|https|Http|Https|rtsp|Rtsp):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?((?:(?:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}\\.)+(?:(?:aero|arpa|asia|agency|a[cdefgilmnoqrstuwxz])|(?:biz|b[abdefghijmnorstvwyz])|(?:cat|cloud|com|company|coop|c[acdfghiklmnoruvxyz])|(?:dev|d[ejkmoz])|(?:edu|e[cegrstu])|f[ijkmor]|(?:gov|guide|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(?:info|int|i[delmnoqrst])|(?:jobs|j[emop])|k[eghimnrwyz]|l[abcikrstuvy]|(?:mil|mobi|museum|m[acdghklmnopqrstuvwxyz])|(?:name|net|n[acefgilopruz])|(?:org|om|one)|(?:pro|p[aefghklmnrstwy])|qa|r[eouw]|(?:shop|store|s[abcdeghijklmnortuvyz])|(?:tel|travel|team|t[cdfghjklmnoprtvwz])|u[agkmsyz]|v[aceginu]|(?:work|w[fs])|(?:xyz)|y[etu]|z[amw]))|(?:(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[0-9])))(?:\\:\\d{1,5})?)(\\/(?:(?:[a-zA-Z0-9\\;\\/\\?\\:\\@\\&\\=\\#\\~\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])|(?:\\%[a-fA-F0-9]{2}))*)?(?:\\b|$)",this.emailPattern="[a-zA-Z0-9\\+\\.\\_\\%\\-]{1,256}\\@[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25})+",this.filenamePattern="\\b[a-zA-Z0-9_%\\-]+\\.(ai|asm|bat|bmp|c|cpp|cs|css|csv|dart|doc|docx|exe|gif|go|html|ics|java|jpeg|jpg|js|json|key|kt|less|lua|log|md|mp4|odp|ods|odt|pdf|php|pl|png|ppt|pptx|psd|py|r|rar|rb|rs|scala|scss|sh|svg|sql|swift|tar.gz|tar|tex|tiff|ts|txt|vbs|xml|xls|xlsx|yaml|yml|zip)\\b",this.cardinalNumber="\\d",this.ordinalIndicator=c[n].numbers.ordinalIndicator,this.romanNumerals="IVXLCDM",this.romanOrdinalIndicator=c[n].numbers.romanOrdinalIndicator,this.singleWordAbbreviations=[],c)this.singleWordAbbreviations=this.singleWordAbbreviations.concat(c[n].singleWordAbbreviations);for(n in this.multipleWordAbbreviations=[],c)this.multipleWordAbbreviations=this.multipleWordAbbreviations.concat(c[n].multipleWordAbbreviations)})},{"./cs":25,"./de-de":26,"./en-us":27,"./rue":29,"./sk":30}],29:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={quotes:{leftDoubleQuote:"«",rightDoubleQuote:"»",leftSingleQuote:"‹",rightSingleQuote:"›"},numbers:{ordinalIndicator:"\\.",romanOrdinalIndicator:"\\."},singleWordAbbreviations:["ціт","ст","канц","абз","тзв","Зб","ч","напр"],multipleWordAbbreviations:["т зн","Е Ч","евід ч","род ч","т ч","т д"]}},{}],30:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={quotes:{leftDoubleQuote:"„",rightDoubleQuote:"“",leftSingleQuote:"‚",rightSingleQuote:"‘"},numbers:{ordinalIndicator:"\\.",romanOrdinalIndicator:"\\."},singleWordAbbreviations:["č","s","fol","str","r","par","odst","napr","sv","tzv","čl","cit","roč","vyd"],multipleWordAbbreviations:["hl m","n l","p n l","pr n l","s a","s l","t j","zodp red","t č"]}},{}],31:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixTypos=function(e,n,t){n=void 0===n?"en-us":n;var n=new a.default(n),r=(t=void 0===t?{removeLines:!0,removeWhitespacesBeforeMarkdownList:!0,keepMarkdownCodeBlocks:!1}:t,(0,R.excludeExceptions)(e,n)),s=r.processedText,r=r.exceptions;e=s,t.removeLines&&(e=(0,i.removeEmptyLines)(e));return e=(0,u.fixEllipsis)(e,n),e=(0,p.fixSpaces)(e,n,t),e=(0,l.fixPeriod)(e),e=(0,d.fixDash)(e,n),e=(0,c.fixHyphen)(e,n),e=(0,f.fixSingleQuotesPrimesAndApostrophes)(e,n,t),e=(0,g.fixDoubleQuotesAndPrimes)(e,n,t),e=(0,h.fixMultiplicationSign)(e,n),e=(0,b.fixSectionSign)(e,n),e=(0,m.fixCopyright)(e,n),e=(0,$.fixSoundRecordingCopyright)(e,n),e=(0,w.fixPlusMinus)(e,n),e=(0,y.fixRegisteredTrademark)(e,n),e=(0,x.fixTrademark)(e,n),e=(0,_.fixExponents)(e,n),e=(0,v.fixNumberSign)(e,n),e=(0,E.fixCase)(e,n),e=(0,S.fixAbbreviations)(e,n),e=(0,P.fixPubId)(e,n),e=(0,o.fixNbsp)(e,n),e=(0,R.placeExceptions)(e,r)};var a=(t=e("./locale/locale"))&&t.__esModule?t:{default:t},i=e("./lib/whitespace/lines"),o=e("./lib/whitespace/nbsp"),p=e("./lib/whitespace/spaces"),l=e("./lib/punctuation/period"),u=e("./lib/punctuation/ellipsis"),c=e("./lib/punctuation/hyphen"),d=e("./lib/punctuation/dash"),g=e("./lib/punctuation/double-quotes"),f=e("./lib/punctuation/single-quotes"),h=e("./lib/symbols/multiplication-sign"),b=e("./lib/symbols/section-sign"),m=e("./lib/symbols/copyright"),$=e("./lib/symbols/sound-recording-copyright"),w=e("./lib/symbols/plus-minus"),y=e("./lib/symbols/registered-trademark"),x=e("./lib/symbols/trademark"),_=e("./lib/symbols/exponents"),v=e("./lib/symbols/number-sign"),S=e("./lib/words/abbreviations"),E=e("./lib/words/case"),P=e("./lib/words/pub-id"),R=e("./lib/words/exceptions")},{"./lib/punctuation/dash":2,"./lib/punctuation/double-quotes":3,"./lib/punctuation/ellipsis":4,"./lib/punctuation/hyphen":5,"./lib/punctuation/period":7,"./lib/punctuation/single-quotes":8,"./lib/symbols/copyright":9,"./lib/symbols/exponents":10,"./lib/symbols/multiplication-sign":11,"./lib/symbols/number-sign":12,"./lib/symbols/plus-minus":13,"./lib/symbols/registered-trademark":14,"./lib/symbols/section-sign":15,"./lib/symbols/sound-recording-copyright":16,"./lib/symbols/trademark":17,"./lib/whitespace/lines":18,"./lib/whitespace/nbsp":19,"./lib/whitespace/spaces":20,"./lib/words/abbreviations":21,"./lib/words/case":22,"./lib/words/exceptions":23,"./lib/words/pub-id":24,"./locale/locale":28}]},{},[1]); \ No newline at end of file diff --git a/dist/typopo_dist.min.js b/dist/typopo_dist.min.js index 2c20fe4..79385c9 100644 --- a/dist/typopo_dist.min.js +++ b/dist/typopo_dist.min.js @@ -1 +1,6 @@ +/*! + * Typopo v2.5.7 (https://typopo.org) + * Copyright 2015–2024 Braňo Šandala (https://brano.me) + * Licensed under MIT (https://github.com/surfinzap/typopo/blob/main/LICENSE.txt) + */ !function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).typopo=e()}(function(){return function r(i,s,a){function o(n,e){if(!s[n]){if(!i[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(p)return p(n,!0);throw(e=new Error("Cannot find module '"+n+"'")).code="MODULE_NOT_FOUND",e}t=s[n]={exports:{}},i[n][0].call(t.exports,function(e){return o(i[n][1][e]||e)},t,t.exports,r,i,s,a)}return s[n].exports}for(var p="function"==typeof require&&require,e=0;e{var t="(\\(c\\))(["+n.spaces+"]?)("+n.cardinalNumber+")",t=new RegExp(t,"gi"),n=n.copyright+"$2$3";return e.replace(t,n)})(e,n),e=(0,r.addSpaceBeforeSymbol)(e,n,n.copyright),e=(0,i.addNbspAfterSymbol)(e,n,n.copyright),e=(0,i.replaceSpacesWithNbspAfterSymbol)(e,n,n.copyright)};var r=e("../whitespace/spaces"),i=e("../whitespace/nbsp")},{"../whitespace/nbsp":18,"../whitespace/spaces":19}],9:[function(e,n,t){function r(e,n,t,r){n="(["+n.spaces+n.slash+"])(m|dam|hm|km|Mm|Gm|Tm|Pm|Em|Zm|Ym|m|dm|cm|mm|µm|nm|pm|fm|am|zm|ym)("+t+")",t=new RegExp(n,"g");return e.replace(t,"$1$2"+r)}function i(e,n){return r(e,n,"2","²")}function s(e,n){return r(e,n,"3","³")}Object.defineProperty(t,"__esModule",{value:!0}),t.fixCubes=s,t.fixExponents=function(e,n){return e=s(e=i(e,n),n)},t.fixSquares=i},{}],10:[function(e,n,t){function r(e,n){var t="(["+n.cardinalNumber+"]+)(["+n.spaces+"]?["+n.lowercaseChars+n.singlePrime+n.doublePrime+"]*)(["+n.spaces+"][x]["+n.spaces+"])(["+n.cardinalNumber+"]+)(["+n.spaces+"]?["+n.lowercaseChars+n.singlePrime+n.doublePrime+"]*)",t=new RegExp(t,"gi"),n="$1$2"+n.nbsp+n.multiplicationSign+n.nbsp+"$4$5";return e=(e=e.replace(t,n)).replace(t,n)}function i(e,n){var t="(["+n.allChars+"]+)(["+n.spaces+"][x]["+n.spaces+"])(["+n.allChars+"]+)",t=new RegExp(t,"g"),n="$1"+n.nbsp+n.multiplicationSign+n.nbsp+"$3";return e=(e=e.replace(t,n)).replace(t,n)}function s(e,a){var n="(["+a.cardinalNumber+"])(["+a.spaces+"]?)([x|×])(["+a.spaces+"])(["+a.lowercaseChars+"]+)",n=new RegExp(n,"gi");return e=e.replace(n,function(e,n,t,r,i,s){return""==t?n+t+a.multiplicationSign+a.nbsp+s:n+a.nbsp+a.multiplicationSign+a.nbsp+s})}function a(e,n){var t="(["+n.cardinalNumber+"]+)(["+n.singlePrime+n.doublePrime+"])?([x|×])(["+n.cardinalNumber+"]+)(["+n.singlePrime+n.doublePrime+"])?",t=new RegExp(t,"gi"),n="$1$2"+n.nbsp+n.multiplicationSign+n.nbsp+"$4$5";return e.replace(t,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.fixMultiplicationSign=function(e,n){return e=a(e=s(e=i(e=r(e,n),n),n),n)},t.fixMultiplicationSignBetweenNumberAndWord=s,t.fixMultiplicationSignBetweenNumbers=r,t.fixMultiplicationSignBetweenWords=i,t.fixNbspAroundMultiplicationSign=a},{}],11:[function(e,n,t){function r(e,n){return e.replace(new RegExp("(["+n.spaces+"]+)("+n.numberSign+")(["+n.spaces+"]+)("+n.cardinalNumber+")","g"),"$1$2$4")}Object.defineProperty(t,"__esModule",{value:!0}),t.fixNumberSign=function(e,n){return e=r(e,n)},t.removeExtraSpacesAfterNumberSign=r},{}],12:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixPlusMinus=function(e,n){var t=new RegExp("(\\+\\-)|(\\-\\+)","g"),n=n.plusMinus;return e.replace(t,n)}},{}],13:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixRegisteredTrademark=function(e,n){return e=((e,n)=>{var t="([^0-9]|^)(["+n.spaces+"]*)(\\(r\\)|"+n.registeredTrademark+")",t=new RegExp(t,"gi"),n="$1"+n.registeredTrademark;return e.replace(t,n)})(e,n)}},{}],14:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixSectionSign=function(e,n){return e=((e,n)=>{var t="("+n.sectionSign+")(["+n.spaces+"])",t=new RegExp(t,"g"),n="$1"+n.nbsp;return e.replace(t,n)})(e=((e,n)=>{var t="("+n.sectionSign+")([^"+n.spaces+n.sectionSign+"])",t=new RegExp(t,"g"),n="$1"+n.nbsp+"$2";return e.replace(t,n)})(e=((e,n)=>{var t="([^"+n.spaces+n.sectionSign+n.openingBrackets+"])("+n.sectionSign+")",t=new RegExp(t,"g"),n="$1"+n.space+"$2";return e.replace(t,n)})(e,n),n),n)}},{}],15:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixSoundRecordingCopyright=function(e,n){return e=((e,n)=>{var t="(\\(p\\))(["+n.spaces+"]?)("+n.cardinalNumber+")",t=new RegExp(t,"gi"),n=n.soundRecordingCopyright+"$2$3";return e.replace(t,n)})(e,n),e=(0,r.addSpaceBeforeSymbol)(e,n,n.soundRecordingCopyright),e=(0,i.addNbspAfterSymbol)(e,n,n.soundRecordingCopyright),e=(0,i.replaceSpacesWithNbspAfterSymbol)(e,n,n.soundRecordingCopyright)};var r=e("../whitespace/spaces"),i=e("../whitespace/nbsp")},{"../whitespace/nbsp":18,"../whitespace/spaces":19}],16:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixTrademark=function(e,n){return e=((e,n)=>{var t="(["+n.spaces+"]*)(\\(tm\\)|"+n.trademark+")",t=new RegExp(t,"gi"),n=n.trademark;return e.replace(t,n)})(e,n)}},{}],17:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.removeEmptyLines=function(e){return e.replace(/[\n\r]{2,}/gm,"\n")}},{}],18:[function(e,n,t){function r(e,n){n="(["+n.lowercaseChars+n.uppercaseChars+"]{2,})(["+n.nbsp+n.narrowNbsp+"])(["+n.lowercaseChars+n.uppercaseChars+"]{2,})",n=new RegExp(n,"g");return e=(e=e.replace(n,"$1 $3")).replace(n,"$1 $3")}function i(e,n){var t="(^|["+n.space+"]|[^"+n.allChars+n.cardinalNumber+n.apostrophe+n.plus+n.minus+n.hyphen+"])(["+n.lowercaseChars+"])(["+n.space+"])",r=new RegExp(t,"g"),i="$1$2"+n.nbsp;return e=(e=e.replace(r,i)).replace(r,i),t="(^|["+n.sentencePunctuation+n.ellipsis+n.copyright+n.registeredTrademark+n.soundRecordingCopyright+"])(["+n.spaces+"]?)(["+n.uppercaseChars+"])(["+n.spaces+"])",r=new RegExp(t,"g"),i="$1$2$3"+n.nbsp,e=e.replace(r,i),e="en-us"==n.locale?e.replace(new RegExp("(^|["+n.spaces+"])(I)(["+n.spaces+"])","g"),"$1$2"+n.nbsp):e}function s(e,n){var t="(["+n.spaces+"])("+n.ampersand+")(["+n.spaces+"])",t=new RegExp(t,"g"),n=" $2"+n.nbsp;return e.replace(t,n)}function a(e,n){return e.replace(new RegExp("([^"+n.nbsp+n.cardinalNumber+"]|^)("+n.cardinalNumber+"{1,2})(["+n.spaces+"])(["+n.allChars+"])","g"),"$1$2"+n.nbsp+"$4")}function o(e,n){return e.replace(new RegExp("([^"+n.nbsp+n.cardinalNumber+"_%\\-]|^)("+n.cardinalNumber+"{1,2})("+n.ordinalIndicator+")(["+n.spaces+"]?)(["+n.allChars+"])","g"),"$1$2$3"+n.nbsp+"$5")}function p(e,n){var t="("+n.cardinalNumber+")("+n.ordinalIndicator+")(["+n.spaces+"]?)("+n.cardinalNumber+")("+n.ordinalIndicator+")(["+n.spaces+"]?)("+n.cardinalNumber+")",t=new RegExp(t,"g"),r="";switch(n.locale){case"en-us":case"rue":case"sk":case"cs":r="$1$2"+n.nbsp+"$4$5"+n.nbsp+"$7";break;case"de-de":r="$1$2"+n.nbsp+"$4$5"+n.space+"$7"}return e.replace(t,r)}function l(e,n){var t;return""!=n.romanOrdinalIndicator?(t="(\\b)(["+n.romanNumerals+"]+)("+n.romanOrdinalIndicator+")(["+n.spaces+"]?)(["+n.allChars+n.cardinalNumber+"])",t=new RegExp(t,"g"),n="$1$2$3"+n.nbsp+"$5",e.replace(t,n)):e}function u(e,a){var n="(\\b["+a.uppercaseChars+"]["+a.lowercaseChars+"]+?)(["+a.spaces+"])(["+a.romanNumerals+"]+\\b)("+a.romanOrdinalIndicator+")(["+a.nbsp+"]?)",n=new RegExp(n,"g");return e.replace(n,function(e,n,t,r,i,s){return""==s&&"I"==r?n+a.space+r+i:""==s&&"I"!=r?n+a.nbsp+r+i:s==a.nbsp&&"I"==r?n+a.space+r+i+s:n+a.nbsp+r+i+a.space})}function c(e,n){var t="(["+n.spaces+"])(["+n.percent+n.permille+n.permyriad+"])",t=new RegExp(t,"g"),n=n.nbsp+"$2";return e.replace(t,n)}function d(e,a){var n=a.uppercaseChars;"en-us"==a.locale&&(n=n.replace(/A-Z/g,"A-HJ-Z"));n=new RegExp("([^"+a.sentencePunctuation+a.ellipsis+a.closingBrackets+a.rightDoubleQuote+a.rightSingleQuote+a.apostrophe+a.multiplicationSign+a.emDash+a.enDash+"])(["+a.spaces+"])(["+n+"])((["+a.spaces+"])|(\\.$|$))","g");return e.replace(n,function(e,n,t,r,i,s){return"en-us"==a.locale||"I"!=r||s!=a.nbsp&&s!=a.hairSpace&&s!=a.narrowNbsp?n+a.nbsp+r+i:n+a.nbsp+r+a.space})}Object.defineProperty(t,"__esModule",{value:!0}),t.addNbspAfterAmpersand=s,t.addNbspAfterCardinalNumber=a,t.addNbspAfterOrdinalNumber=o,t.addNbspAfterPreposition=i,t.addNbspAfterRomanNumeral=l,t.addNbspAfterSymbol=function(e,n,t){t="("+t+")([^"+n.spaces+"])",t=new RegExp(t,"g"),n="$1"+n.nbsp+"$2";return e.replace(t,n)},t.addNbspBeforePercent=c,t.addNbspBeforeSingleLetter=d,t.addNbspWithinOrdinalDate=p,t.fixNbsp=function(e,n){return e=c(e=u(e=d(e=l(e=p(e=o(e=a(e=s(e=i(e=r(e,n),n),n),n),n),n),n),n),n),n)},t.fixNbspForNameWithRegnalNumber=u,t.removeNbspBetweenMultiCharWords=r,t.replaceSpacesWithNbspAfterSymbol=function(e,n,t){t="("+t+")(["+n.spaces+"])",t=new RegExp(t,"g"),n="$1"+n.nbsp;return e.replace(t,n)}},{}],19:[function(e,n,t){function r(e,n){n="(\\S)(["+n.spaces+"]{2,})(\\S)",n=new RegExp(n,"g");return e.replace(n,"$1 $3")}function i(e,n,r){for(var t=e.split(/\r?\n/),i=new RegExp("(^\\s+)([-\\*\\+]*)","g"),s=0;sn.reduce(function(e,n,t){t="{{typopo__exception-".concat(t,"}}");return e.replace(n,t)},e))(e,t),exceptions:t}},t.placeExceptions=function(e,n){return n.reduce(function(e,n,t){t=new RegExp("{{typopo__exception-".concat(t,"}}"),"g");return e.replace(t,n)},e)}},{}],23:[function(e,n,t){function r(e,n){var t="(issn)(:?)(["+n.spaces+"]?)(\\d{4})(["+n.spaces+"]?["+n.hyphen+n.enDash+n.emDash+"]["+n.spaces+"]?)(\\d{4})",t=new RegExp(t,"gi"),n="ISSN$2"+n.nbsp+"$4-$6";return e.replace(t,n)}function i(e,n){var t="(["+n.spaces+"]?["+n.hyphen+n.enDash+n.emDash+"]["+n.spaces+"]?)",t=new RegExp("(isbn)(:?)(["+n.spaces+"]?)(\\d+)"+t+"(\\d+)"+t+"(\\d+)"+t+"(X|\\d+)","gi"),n="ISBN$2"+n.nbsp+"$4-$6-$8-$10";return e.replace(t,n)}function s(e,n){var t="(["+n.spaces+"]?["+n.hyphen+n.enDash+n.emDash+"]["+n.spaces+"]?)",t=new RegExp("(isbn)(:?)(["+n.spaces+"]?)(\\d+)"+t+"(\\d+)"+t+"(\\d+)"+t+"(\\d+)"+t+"(X|\\d+)","gi"),n="ISBN$2"+n.nbsp+"$4-$6-$8-$10-$12";return e.replace(t,n)}function a(e,n){n="(["+n.spaces+"]?["+n.hyphen+n.enDash+n.emDash+"]["+n.spaces+"]?)",n=new RegExp("(\\d+)"+n+"(\\d+)"+n+"(\\d+)"+n+"(\\d+)"+n+"(X|\\d+?)","g");return e.replace(n,"$1-$3-$5-$7-$9")}Object.defineProperty(t,"__esModule",{value:!0}),t.fixISBN10=i,t.fixISBN13=s,t.fixISBNnumber=a,t.fixISSN=r,t.fixPubId=function(e,n){return e=a(e=s(e=i(e=r(e,n),n),n),n)}},{}],24:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={quotes:{leftDoubleQuote:"„",rightDoubleQuote:"“",leftSingleQuote:"‚",rightSingleQuote:"‘"},numbers:{ordinalIndicator:"\\.",romanOrdinalIndicator:"\\."},singleWordAbbreviations:["č","s","fol","str","r","par","odst","např","sv","tj","tzv"],multipleWordAbbreviations:["hl m","n l","p n l","př n l"]}},{}],25:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={quotes:{leftDoubleQuote:"„",rightDoubleQuote:"“",leftSingleQuote:"‚",rightSingleQuote:"‘"},numbers:{ordinalIndicator:"\\.",romanOrdinalIndicator:"\\."},singleWordAbbreviations:["S","z","St","Stk","Mo","Di","Mi","Do","Fr","Sa","So","Bhf","Hbf","Nr","ca","usw","geb","gest","u"],multipleWordAbbreviations:["b w","d h","d i","e V","n Chr","s a","s o","s u","u a","u ä","u Ä","u dgl","u U","u z","u zw","v a","v Chr","z B","z T","z Zt","n u Z","u a m","v u Z","Ges m b H"]}},{}],26:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={quotes:{leftDoubleQuote:"“",rightDoubleQuote:"”",leftSingleQuote:"‘",rightSingleQuote:"’"},numbers:{ordinalIndicator:"st|nd|rd|th",romanOrdinalIndicator:""},singleWordAbbreviations:["p","pp","no","vol"],multipleWordAbbreviations:["U S","e g","i e","a m","p m"]}},{}],27:[function(e,n,t){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(e("./cs")),s=p(e("./en-us")),a=p(e("./rue")),o=p(e("./sk")),e=p(e("./de-de"));function p(e){return e&&e.__esModule?e:{default:e}}function l(e,n){for(var t=0;t(e=((e,n)=>{if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return("string"===n?String:Number)(e);if("object"!=i(t=t.call(e,n||"default")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==i(e)?e:e+""))(r.key),r)}}function u(e,n,t){return n&&l(e.prototype,n),t&&l(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var c={cs:r.default,"en-us":s.default,rue:a.default,sk:o.default,"de-de":e.default};t.default=u(function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");for(n in this.locale=n,this.nonLatinLowercase="áäčďéěíĺľňóôöőŕřšťúüűůýŷžабвгґдезіийклмнопрстуфъыьцчжшїщёєюях",this.nonLatinUppercase="ÁÄČĎÉĚÍĹĽŇÓÔÖŐŔŘŠŤÚÜŰŮÝŶŽАБВГҐДЕЗІИЙКЛМНОПРСТУФЪЫЬЦЧЖШЇЩЁЄЮЯХ",this.nonLatinChars=this.nonLatinLowercase+this.nonLatinUppercase,this.lowercaseChars="a-z"+this.nonLatinLowercase,this.uppercaseChars="A-Z"+this.nonLatinUppercase,this.allChars=this.lowercaseChars+this.uppercaseChars,this.singleQuoteAdepts="‚|'|‘|’|ʼ|‛|´|`|′|‹|›",this.leftSingleQuote=c[n].quotes.leftSingleQuote,this.rightSingleQuote=c[n].quotes.rightSingleQuote,this.apostrophe="’",this.singlePrime="′",this.backtick="`",this.doubleQuoteAdepts="„|“|”|\"|«|»|″|,{2,}|‘{2,}|’{2,}|'{2,}|‹{2,}|›{2,}|′{2,}|´{2,}|`{2,}",this.leftDoubleQuote=c[n].quotes.leftDoubleQuote,this.rightDoubleQuote=c[n].quotes.rightDoubleQuote,this.doublePrime="″",this.space=" ",this.nbsp=" ",this.hairSpace=" ",this.narrowNbsp=" ",this.spaces=this.space+this.nbsp+this.hairSpace+this.narrowNbsp,this.terminalPunctuation="\\.\\!\\?",this.terminalQuotes=this.rightSingleQuote+this.rightDoubleQuote,this.sentencePausePunctuation="\\,\\:\\;",this.sentencePunctuation=this.sentencePausePunctuation+this.terminalPunctuation,this.openingBrackets="\\(\\[\\{",this.closingBrackets="\\)\\]\\}",this.ellipsis="…",this.hyphen="-",this.enDash="–",this.emDash="—",this.slash="/",this.degree="°",this.multiplicationSign="×",this.ampersand="&",this.sectionSign="§",this.copyright="©",this.registeredTrademark="®",this.soundRecordingCopyright="℗",this.trademark="™",this.plus="+",this.minus="−",this.plusMinus="±",this.percent="%",this.permille="‰",this.permyriad="‱",this.numberSign="#",this.urlPattern="((?:(http|https|Http|Https|rtsp|Rtsp):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?((?:(?:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}\\.)+(?:(?:aero|arpa|asia|agency|a[cdefgilmnoqrstuwxz])|(?:biz|b[abdefghijmnorstvwyz])|(?:cat|cloud|com|company|coop|c[acdfghiklmnoruvxyz])|(?:dev|d[ejkmoz])|(?:edu|e[cegrstu])|f[ijkmor]|(?:gov|guide|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(?:info|int|i[delmnoqrst])|(?:jobs|j[emop])|k[eghimnrwyz]|l[abcikrstuvy]|(?:mil|mobi|museum|m[acdghklmnopqrstuvwxyz])|(?:name|net|n[acefgilopruz])|(?:org|om|one)|(?:pro|p[aefghklmnrstwy])|qa|r[eouw]|(?:shop|store|s[abcdeghijklmnortuvyz])|(?:tel|travel|team|t[cdfghjklmnoprtvwz])|u[agkmsyz]|v[aceginu]|(?:work|w[fs])|(?:xyz)|y[etu]|z[amw]))|(?:(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[0-9])))(?:\\:\\d{1,5})?)(\\/(?:(?:[a-zA-Z0-9\\;\\/\\?\\:\\@\\&\\=\\#\\~\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])|(?:\\%[a-fA-F0-9]{2}))*)?(?:\\b|$)",this.emailPattern="[a-zA-Z0-9\\+\\.\\_\\%\\-]{1,256}\\@[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25})+",this.filenamePattern="\\b[a-zA-Z0-9_%\\-]+\\.(ai|asm|bat|bmp|c|cpp|cs|css|csv|dart|doc|docx|exe|gif|go|html|ics|java|jpeg|jpg|js|json|key|kt|less|lua|log|md|mp4|odp|ods|odt|pdf|php|pl|png|ppt|pptx|psd|py|r|rar|rb|rs|scala|scss|sh|svg|sql|swift|tar.gz|tar|tex|tiff|ts|txt|vbs|xml|xls|xlsx|yaml|yml|zip)\\b",this.cardinalNumber="\\d",this.ordinalIndicator=c[n].numbers.ordinalIndicator,this.romanNumerals="IVXLCDM",this.romanOrdinalIndicator=c[n].numbers.romanOrdinalIndicator,this.singleWordAbbreviations=[],c)this.singleWordAbbreviations=this.singleWordAbbreviations.concat(c[n].singleWordAbbreviations);for(n in this.multipleWordAbbreviations=[],c)this.multipleWordAbbreviations=this.multipleWordAbbreviations.concat(c[n].multipleWordAbbreviations)})},{"./cs":24,"./de-de":25,"./en-us":26,"./rue":28,"./sk":29}],28:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={quotes:{leftDoubleQuote:"«",rightDoubleQuote:"»",leftSingleQuote:"‹",rightSingleQuote:"›"},numbers:{ordinalIndicator:"\\.",romanOrdinalIndicator:"\\."},singleWordAbbreviations:["ціт","ст","канц","абз","тзв","Зб","ч","напр"],multipleWordAbbreviations:["т зн","Е Ч","евід ч","род ч","т ч","т д"]}},{}],29:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={quotes:{leftDoubleQuote:"„",rightDoubleQuote:"“",leftSingleQuote:"‚",rightSingleQuote:"‘"},numbers:{ordinalIndicator:"\\.",romanOrdinalIndicator:"\\."},singleWordAbbreviations:["č","s","fol","str","r","par","odst","napr","sv","tzv","čl","cit","roč","vyd"],multipleWordAbbreviations:["hl m","n l","p n l","pr n l","s a","s l","t j","zodp red","t č"]}},{}],30:[function(e,n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fixTypos=function(e,n,t){n=void 0===n?"en-us":n;var n=new s.default(n),r=(t=void 0===t?{removeLines:!0,removeWhitespacesBeforeMarkdownList:!0,keepMarkdownCodeBlocks:!1}:t,(0,R.excludeExceptions)(e,n)),i=r.processedText,r=r.exceptions;e=i,t.removeLines&&(e=(0,a.removeEmptyLines)(e));return e=(0,u.fixEllipsis)(e,n),e=(0,p.fixSpaces)(e,n,t),e=(0,l.fixPeriod)(e),e=(0,d.fixDash)(e,n),e=(0,c.fixHyphen)(e,n),e=(0,f.fixSingleQuotesPrimesAndApostrophes)(e,n,t),e=(0,g.fixDoubleQuotesAndPrimes)(e,n,t),e=(0,b.fixMultiplicationSign)(e,n),e=(0,h.fixSectionSign)(e,n),e=(0,m.fixCopyright)(e,n),e=(0,$.fixSoundRecordingCopyright)(e,n),e=(0,w.fixPlusMinus)(e,n),e=(0,y.fixRegisteredTrademark)(e,n),e=(0,x.fixTrademark)(e,n),e=(0,_.fixExponents)(e,n),e=(0,v.fixNumberSign)(e,n),e=(0,E.fixCase)(e,n),e=(0,S.fixAbbreviations)(e,n),e=(0,P.fixPubId)(e,n),e=(0,o.fixNbsp)(e,n),e=(0,R.placeExceptions)(e,r)};var s=(t=e("./locale/locale"))&&t.__esModule?t:{default:t},a=e("./lib/whitespace/lines"),o=e("./lib/whitespace/nbsp"),p=e("./lib/whitespace/spaces"),l=e("./lib/punctuation/period"),u=e("./lib/punctuation/ellipsis"),c=e("./lib/punctuation/hyphen"),d=e("./lib/punctuation/dash"),g=e("./lib/punctuation/double-quotes"),f=e("./lib/punctuation/single-quotes"),b=e("./lib/symbols/multiplication-sign"),h=e("./lib/symbols/section-sign"),m=e("./lib/symbols/copyright"),$=e("./lib/symbols/sound-recording-copyright"),w=e("./lib/symbols/plus-minus"),y=e("./lib/symbols/registered-trademark"),x=e("./lib/symbols/trademark"),_=e("./lib/symbols/exponents"),v=e("./lib/symbols/number-sign"),S=e("./lib/words/abbreviations"),E=e("./lib/words/case"),P=e("./lib/words/pub-id"),R=e("./lib/words/exceptions")},{"./lib/punctuation/dash":1,"./lib/punctuation/double-quotes":2,"./lib/punctuation/ellipsis":3,"./lib/punctuation/hyphen":4,"./lib/punctuation/period":6,"./lib/punctuation/single-quotes":7,"./lib/symbols/copyright":8,"./lib/symbols/exponents":9,"./lib/symbols/multiplication-sign":10,"./lib/symbols/number-sign":11,"./lib/symbols/plus-minus":12,"./lib/symbols/registered-trademark":13,"./lib/symbols/section-sign":14,"./lib/symbols/sound-recording-copyright":15,"./lib/symbols/trademark":16,"./lib/whitespace/lines":17,"./lib/whitespace/nbsp":18,"./lib/whitespace/spaces":19,"./lib/words/abbreviations":20,"./lib/words/case":21,"./lib/words/exceptions":22,"./lib/words/pub-id":23,"./locale/locale":27}]},{},[30])(30)}); \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 3fc6664..b9d2bd0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -6,6 +6,11 @@ const browserify = require('browserify'); const babelify = require('babelify'); const source = require('vinyl-source-stream'); const buffer = require('vinyl-buffer'); +const replace = require('gulp-replace'); +const header = require('gulp-header'); +const packageJson = require('./package.json'); + +const currentYear = new Date().getFullYear(); var paths = { dev: { @@ -23,12 +28,31 @@ var paths = { src: 'src/typopo.js', name: 'typopo_dist.min.js', dest: 'dist/' + }, + root: { + src: 'src/typopo.js', + dest: 'src/' } }; -/* - * Define our tasks using plain functions +// Copyright banner for the minified files +const copyrightBanner = `/*! + * Typopo v${packageJson.version} (https://typopo.org) + * Copyright 2015–${currentYear} Braňo Šandala (https://brano.me) + * Licensed under MIT (https://github.com/surfinzap/typopo/blob/main/LICENSE.txt) */ +`; + +// Update version in typopo.js +function updateTypopoJsCopyrightBanner() { + + const bannerRegex = /\/\*\![\s\S]*?\*\/\s*/; + + return gulp.src(paths.root.src) + .pipe(replace(bannerRegex, '')) + .pipe(header(copyrightBanner)) + .pipe(gulp.dest(paths.root.dest)); +} function devBrowserBuild() { return browserify({entries: paths.browser.src, debug: true}) @@ -39,17 +63,17 @@ function devBrowserBuild() { .pipe(sourcemaps.init()) .pipe(sourcemaps.write('./maps')) .pipe(gulp.dest(paths.dev.dest)) - } - +} function browserBuild() { return browserify({ entries: paths.browser.src, debug: false }) - .transform(babelify) - .bundle() - .pipe(source(paths.browser.name)) - .pipe(buffer()) - .pipe(uglify()) - .pipe(gulp.dest(paths.browser.dest)); + .transform(babelify) + .bundle() + .pipe(source(paths.browser.name)) + .pipe(buffer()) + .pipe(uglify()) + .pipe(header(copyrightBanner)) // Add the header + .pipe(gulp.dest(paths.browser.dest)); } function npmBuild() { @@ -59,7 +83,8 @@ function npmBuild() { .pipe(source(paths.npm.name)) .pipe(buffer()) .pipe(uglify()) - .pipe(gulp.dest(paths.npm.dest)) + .pipe(header(copyrightBanner)) // Add the header + .pipe(gulp.dest(paths.npm.dest)); } function copyHtmlToDest() { @@ -103,6 +128,7 @@ const build = gulp.parallel(npmBuild, browserBuild, copyHtmlToDest); exports.watch = watch; exports.build = build; +exports.updateTypopoJsCopyrightBanner = updateTypopoJsCopyrightBanner; /* * Define default task that can be called by just running `gulp` from cli */ diff --git a/package.json b/package.json index 819a19e..33b2741 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "license": "MIT", "author": { "name": "Braňo Šandala", - "email": "hi@brano.me" + "email": "help@typopo.org" }, "scripts": { "dev": "gulp watch", @@ -53,6 +53,8 @@ "gulp-babel": "^8.0.0", "gulp-cli": "^3.0.0", "gulp-concat": "^2.6.1", + "gulp-header": "^2.0.9", + "gulp-replace": "^1.1.4", "gulp-sourcemaps": "^3.0.0", "gulp-uglify": "^3.0.2", "husky": "^9.1.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f1e1b3..34fd100 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,6 +44,12 @@ importers: gulp-concat: specifier: ^2.6.1 version: 2.6.1 + gulp-header: + specifier: ^2.0.9 + version: 2.0.9 + gulp-replace: + specifier: ^1.1.4 + version: 1.1.4 gulp-sourcemaps: specifier: ^3.0.0 version: 3.0.0 @@ -753,9 +759,15 @@ packages: '@types/cors@2.8.17': resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} + '@types/expect@1.20.4': + resolution: {integrity: sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==} + '@types/node@22.5.2': resolution: {integrity: sha512-acJsPTEqYqulZS/Yp/S3GgeE6GZ0qYODUR8aVr/DkhHQ8l9nd4j5x1/ZJy9/gHrRlFMqkO6i0I3E27Alu4jjPg==} + '@types/vinyl@2.0.12': + resolution: {integrity: sha512-Sr2fYMBUVGYq8kj3UthXFAu5UN6ZW+rYr4NACjZQJvHvj+c8lYv0CahmZ2P/r7iUkN44gGUBwqxZkrKXYPb7cw==} + JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true @@ -935,6 +947,10 @@ packages: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + binaryextensions@2.3.0: + resolution: {integrity: sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg==} + engines: {node: '>=0.8'} + bl@1.2.3: resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==} @@ -1693,6 +1709,13 @@ packages: resolution: {integrity: sha512-a2scActrQrDBpBbR3WUZGyGS1JEPLg5PZJdIa7/Bi3GuKAmPYDK6SFhy/NZq5R8KsKKFvtfR0fakbUCcKGCCjg==} engines: {node: '>= 0.10'} + gulp-header@2.0.9: + resolution: {integrity: sha512-LMGiBx+qH8giwrOuuZXSGvswcIUh0OiioNkUpLhNyvaC6/Ga8X6cfAeme2L5PqsbXMhL8o8b/OmVqIQdxprhcQ==} + + gulp-replace@1.1.4: + resolution: {integrity: sha512-SVSF7ikuWKhpAW4l4wapAqPPSToJoiNKsbDoUnRrSgwZHH7lH8pbPeQj1aOVYQrbZKhfSVBxVW+Py7vtulRktw==} + engines: {node: '>=10'} + gulp-sourcemaps@3.0.0: resolution: {integrity: sha512-RqvUckJkuYqy4VaIH60RMal4ZtG0IbQ6PXMNkNsshEGJ9cldUPRb/YCgboYae+CLAs1HQNb4ADTKCx65HInquQ==} engines: {node: '>= 6'} @@ -1972,6 +1995,10 @@ packages: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} + istextorbinary@3.3.0: + resolution: {integrity: sha512-Tvq1W6NAcZeJ8op+Hq7tdZ434rqnMx4CCZ7H0ff83uEloDvVbqAwaMTZcafKGJT0VHkYzuXUiCY4hlXQg6WfoQ==} + engines: {node: '>=8'} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -2059,6 +2086,9 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + lodash._reinterpolate@3.0.0: + resolution: {integrity: sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==} + lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} @@ -2071,6 +2101,12 @@ packages: lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.template@4.5.0: + resolution: {integrity: sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==} + + lodash.templatesettings@4.2.0: + resolution: {integrity: sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==} + lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -2102,6 +2138,9 @@ packages: resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} engines: {node: '>=0.10.0'} + map-stream@0.0.7: + resolution: {integrity: sha512-C0X0KQmGm3N2ftbTGBhSyuydQ+vV1LC3f3zPvT3RXHXNZrvfPZcoXp/N5DOa8vedX/rTMm2CjTtivFg2STJMRQ==} + md5.js@1.3.5: resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} @@ -2498,6 +2537,9 @@ packages: resolution: {integrity: sha512-bgEuQQ/BHW0XkkJtawzrfzHFSN70f/3cNOiHa2QsYxqrjaC30X1k74FJ6xswVBP0sr0SpGIdVFuPwfrYziVeyw==} engines: {node: '>= 10.13.0'} + replacestream@4.0.3: + resolution: {integrity: sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==} + require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -2787,6 +2829,10 @@ packages: text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + textextensions@3.3.0: + resolution: {integrity: sha512-mk82dS8eRABNbeVJrEiN5/UMSCliINAuz8mkUwH4SwslkNP//gbEzlWNS5au0z5Dpx40SQxzqZevZkn+WYJ9Dw==} + engines: {node: '>=8'} + through2@2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} @@ -3936,10 +3982,17 @@ snapshots: dependencies: '@types/node': 22.5.2 + '@types/expect@1.20.4': {} + '@types/node@22.5.2': dependencies: undici-types: 6.19.8 + '@types/vinyl@2.0.12': + dependencies: + '@types/expect': 1.20.4 + '@types/node': 22.5.2 + JSONStream@1.3.5: dependencies: jsonparse: 1.3.1 @@ -4100,6 +4153,8 @@ snapshots: binary-extensions@2.3.0: {} + binaryextensions@2.3.0: {} + bl@1.2.3: dependencies: readable-stream: 2.3.8 @@ -5092,6 +5147,21 @@ snapshots: through2: 2.0.5 vinyl: 2.2.1 + gulp-header@2.0.9: + dependencies: + concat-with-sourcemaps: 1.1.0 + lodash.template: 4.5.0 + map-stream: 0.0.7 + through2: 2.0.5 + + gulp-replace@1.1.4: + dependencies: + '@types/node': 22.5.2 + '@types/vinyl': 2.0.12 + istextorbinary: 3.3.0 + replacestream: 4.0.3 + yargs-parser: 21.1.1 + gulp-sourcemaps@3.0.0: dependencies: '@gulp-sourcemaps/identity-map': 2.0.1 @@ -5364,6 +5434,11 @@ snapshots: isobject@3.0.1: {} + istextorbinary@3.3.0: + dependencies: + binaryextensions: 2.3.0 + textextensions: 3.3.0 + js-tokens@4.0.0: {} js-yaml@4.1.0: @@ -5455,6 +5530,8 @@ snapshots: dependencies: p-locate: 5.0.0 + lodash._reinterpolate@3.0.0: {} + lodash.debounce@4.0.8: {} lodash.isfinite@3.3.2: {} @@ -5463,6 +5540,15 @@ snapshots: lodash.merge@4.6.2: {} + lodash.template@4.5.0: + dependencies: + lodash._reinterpolate: 3.0.0 + lodash.templatesettings: 4.2.0 + + lodash.templatesettings@4.2.0: + dependencies: + lodash._reinterpolate: 3.0.0 + lodash@4.17.21: {} log-symbols@4.1.0: @@ -5499,6 +5585,8 @@ snapshots: map-cache@0.2.2: {} + map-stream@0.0.7: {} + md5.js@1.3.5: dependencies: hash-base: 3.1.0 @@ -5904,6 +5992,12 @@ snapshots: replace-homedir@2.0.0: {} + replacestream@4.0.3: + dependencies: + escape-string-regexp: 1.0.5 + object-assign: 4.1.1 + readable-stream: 2.3.8 + require-directory@2.1.1: {} requires-port@1.0.0: {} @@ -6246,6 +6340,8 @@ snapshots: text-table@0.2.0: {} + textextensions@3.3.0: {} + through2@2.0.5: dependencies: readable-stream: 2.3.8 diff --git a/src/typopo.js b/src/typopo.js index 342c561..455dc7f 100644 --- a/src/typopo.js +++ b/src/typopo.js @@ -1,12 +1,8 @@ /*! - * Typopo 2.5.5 - * - * Copyright 2015–24 Braňo Šandala - * Released under the MIT license - * - * Date: 2023-08-27 + * Typopo v2.5.7 (https://typopo.org) + * Copyright 2015–2024 Braňo Šandala (https://brano.me) + * Licensed under MIT (https://github.com/surfinzap/typopo/blob/main/LICENSE.txt) */ - import Locale from "./locale/locale"; import {removeEmptyLines} from "./lib/whitespace/lines"; import {fixNbsp} from "./lib/whitespace/nbsp";