From a58674e597ed4161f57ccbf26b7a59bb597f0167 Mon Sep 17 00:00:00 2001 From: Estevao Soares dos Santos Date: Fri, 6 Jan 2017 04:58:28 +0000 Subject: [PATCH] chore: improve ghMentions --- dist/showdown.js | Bin 74599 -> 74768 bytes dist/showdown.js.map | Bin 219345 -> 219852 bytes dist/showdown.min.js | Bin 30428 -> 30479 bytes dist/showdown.min.js.map | Bin 33476 -> 33608 bytes performance.json | 2 +- performance.log.md | 43 ++++++++++++++++++++++++++++++++++ src/subParsers/anchors.js | 7 +++++- src/subParsers/ghMentions.js | 0 test/features/ghMentions.html | 1 + test/features/ghMentions.md | 2 ++ 10 files changed, 53 insertions(+), 2 deletions(-) delete mode 100644 src/subParsers/ghMentions.js diff --git a/dist/showdown.js b/dist/showdown.js index 1374eae172579ec57d0f2d759d53e41270529b4f..d06f36e782ff6e1fbec3ea663653eaca274cfc88 100644 GIT binary patch delta 206 zcmaEUjAgf_LGaNwKCI6^O8$4^Yaum%5!xTic549Qj3!l3sQ9ya#Qm_ z62&?SrNya5d5O8HnhMoi3Sf|#rl0{)r(kPqtDqheqmGbNP$)_*DJ{wanx>!)H)gWH zE^#)ni2CFO)e8FRKslJfK&HBq9Y_RbDM-XdKhaLz8f;^&=5#qpM%~Rnt7Qx)I~?HL JtgzO-3;-~ZKz0BC delta 48 zcmV-00MGxB$OPxc1h8~_lX-h711BUglPG*33?wrmJ|r?cFJV3>DUcEC-Xh$7I1Jq96q#lNVHQO+S#v$T2y0CCBvRyBXysD_C-}T01&A zn@?t3A~xMB0VuTKAkZ2o*2$f(jHVZGFtSco5M!M#;Lj*BJ>Vgb0J8+z7`dij_|C}5 z=r;LmqujJ(jNFs;z8Ot6xWhGB|8+8xrR(&A!Hj*=CuB2nPcOK`Xf!$D8`pF_X-4>3AYr3=nAAPv5?hNv}SwG%vX%Ge1v3qdZqfp}0gxA+(|y delta 46 zcmeBw$9U&0;|5{l$r8pI%<3wJle3H!xK)gm>{N_w^b_sWC&!!1PJXY?zWIQ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~W2<~iDr9TaQWWK8<8Z7yEdZq?1xmwM<4iEmPM2*ZR5l$& z;DvRd39mp!$)m;08zqY&smk{oeJ5Be;Zz9|7k#BG;sOH??oX~N1Zy|@R`>fZqv;}{ znhc)p5@^#{qskIZAZg)E3|$<6<-<1C5T!}AWRoIIJ;DrkRuS}uIAb?&KG&>&=Dr=Z z+MCG&a^FU3?+6tOOFbCP2V`x-J~_-1q4*-?I!0TSmNZF}L;HipiasLW-8j+%kD$rm z?v8+?Cp(8OhT@FCD38QfG@xXd)LWuP?br(GTA26L!`#-M{C+3h3k@N8YFPTN_G8Ar z|LT#5*C`?|VrMI1lhwLC3!hPsQg~z{Cr^bZ?Pjw0H27rr+|W3AeS&g`Wih63Rl6@APO7ycJNB&?U1f!ti@-U zk2k@s@`{Til$QA#3sWo#6d#nYef8e+b)FGbW2PPhCL7dD3Or7zMpO-veAK)exeInA=X<&EnD7^lB?{h|Hnafk=WgCM}4=CJ(3^}w#{M>ikYET#UFptnq6BuJ;uPBATH z)0D8_|EfPlCP50FTHDeLscE{%PUO-~0s|+t{0t~dX?#U<@wD0%GmaexLoE@hnUe5< zBc{WQbtXc;(AKhU8?L&H%HorvoWD#f}vprdG z2)9;ZyWcv*Y|;>|tA#*N_=O2Eff6ObSgg!qIDSs}48C$Wr>sgqUC!J%zR7Tjw0|oo zaBaxoR#w<}+9X86j7WBYF)<89w0ebSt%5#VIvB>p`@sT@8PXs0a$&m8(U%kWs^ diff --git a/performance.json b/performance.json index 5b372a3..2f0ecfe 100644 --- a/performance.json +++ b/performance.json @@ -1 +1 @@ -{"1.5.5":[{"suiteName":"Basic","cycles":100,"tests":[{"name":"Simple \"Hello World\"","time":0.3017154600000001,"maxTime":5.968856000000001,"minTime":0.14796299999999718},{"name":"readme.md","time":8.157263590000007,"maxTime":17.988235999999993,"minTime":7.204394999999977}]},{"suiteName":"subParsers","cycles":1000,"tests":[{"name":"hashHTMLBlocks","time":0.6816068189999991,"maxTime":1.094506000000024,"minTime":0.6253030000000308},{"name":"anchors","time":0.2342927859999952,"maxTime":0.5794980000000578,"minTime":0.1910560000001169},{"name":"autoLinks","time":0.014762871999999106,"maxTime":0.18050900000002912,"minTime":0.01295799999979863},{"name":"blockGamut","time":7.3070927989999825,"maxTime":17.844490999999834,"minTime":6.509178000000247},{"name":"blockQuotes","time":0.06523252800000227,"maxTime":0.25795599999946717,"minTime":0.058762999999089516},{"name":"codeBlocks","time":0.07315170800001215,"maxTime":1.051713999999265,"minTime":0.06237900000087393},{"name":"codeSpans","time":0.18133396599998558,"maxTime":0.8983270000007906,"minTime":0.1651399999991554},{"name":"detab","time":0.023979393999999956,"maxTime":0.2088370000001305,"minTime":0.022299000000202795},{"name":"encodeAmpsAndAngles","time":0.01590047000001141,"maxTime":0.2796539999999368,"minTime":0.013861999999789987},{"name":"encodeBackslashEscapes","time":0.014044158999993669,"maxTime":0.3592109999990498,"minTime":0.012655999998969492},{"name":"encodeCode","time":0.1713209560000123,"maxTime":0.5418289999997796,"minTime":0.15368899999884889},{"name":"encodeEmailAddress","time":2.3023639950000105,"maxTime":4.221322999999757,"minTime":2.079922999999326},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.06365613699999631,"maxTime":0.4035089999997581,"minTime":0.05424300000049698},{"name":"githubCodeBlocks","time":0.11150525500000368,"maxTime":6.431128999998691,"minTime":0.0569550000000163},{"name":"hashBlock","time":0.031511962000016866,"maxTime":6.548655999999028,"minTime":0.011150000000270666},{"name":"hashElement","time":0.0007349880000037956,"maxTime":0.22661599999992177,"minTime":0},{"name":"hashHTMLSpans","time":0.03193505000001096,"maxTime":6.133695999998963,"minTime":0.00994399999945017},{"name":"hashPreCodeTags","time":0.017636856999988595,"maxTime":0.3019540000004781,"minTime":0.015067999998791493},{"name":"headers","time":0.4557796079999789,"maxTime":7.748634999999922,"minTime":0.3962759999994887},{"name":"images","time":0.03852289700000438,"maxTime":1.0164559999993799,"minTime":0.03284699999858276},{"name":"italicsAndBold","time":0.0357555800000082,"maxTime":0.4667920000010781,"minTime":0.031038999999509542},{"name":"lists","time":5.111364808999966,"maxTime":11.046619000000646,"minTime":4.623325000000477},{"name":"outdent","time":0.05124681700002475,"maxTime":0.4122480000005453,"minTime":0.04429799999707029},{"name":"paragraphs","time":1.3728050700000132,"maxTime":3.7286149999999907,"minTime":1.2099230000021635},{"name":"spanGamut","time":0.7691525840000031,"maxTime":1.306657000000996,"minTime":0.6686979999976757},{"name":"strikethrough","time":0.0004860790000202542,"maxTime":0.2513269999981276,"minTime":0},{"name":"stripBlankLines","time":0.03095717400000649,"maxTime":0.2920090000006894,"minTime":0.027421999999205582},{"name":"stripLinkDefinitions","time":0.06971120600001814,"maxTime":0.42219200000181445,"minTime":0.06117399999857298},{"name":"tables","time":0.000774782000004052,"maxTime":0.21154800000294927,"minTime":0},{"name":"unescapeSpecialChars","time":0.0036451429999833636,"maxTime":0.18713900000147987,"minTime":0.0027119999977003317}]}],"1.5.4":[{"suiteName":"Basic","cycles":100,"tests":[{"name":"Simple \"Hello World\"","time":0.30990324000000025,"maxTime":5.549075,"minTime":0.14916800000000308},{"name":"readme.md","time":8.072704459999997,"maxTime":17.975579000000003,"minTime":7.220064999999977}]}]} \ No newline at end of file +{"1.5.6":[{"suiteName":"Basic","cycles":100,"tests":[{"name":"Simple \"Hello World\"","time":0.48365952999999995,"maxTime":5.497247999999999,"minTime":0.15941500000000275},{"name":"readme.md","time":8.624009609999991,"maxTime":20.72512300000001,"minTime":7.638648999999987}]},{"suiteName":"subParsers","cycles":1000,"tests":[{"name":"hashHTMLBlocks","time":0.6974054759999992,"maxTime":1.1927480000001651,"minTime":0.6367549999999937},{"name":"anchors","time":0.19090051499999935,"maxTime":0.6283180000000357,"minTime":0.1591129999999339},{"name":"autoLinks","time":0.01718004600000063,"maxTime":0.31822600000009515,"minTime":0.01386200000001736},{"name":"blockGamut","time":7.7196042380000085,"maxTime":14.916580000000977,"minTime":6.94945800000005},{"name":"blockQuotes","time":0.06506110199997783,"maxTime":0.23625900000115507,"minTime":0.05966699999953562},{"name":"codeBlocks","time":0.08153567099998872,"maxTime":1.0782339999987016,"minTime":0.06298199999946519},{"name":"codeSpans","time":0.18521222000000126,"maxTime":0.9152030000004743,"minTime":0.1675520000007964},{"name":"detab","time":0.024611045000006927,"maxTime":0.19467299999996612,"minTime":0.022600999998758198},{"name":"encodeAmpsAndAngles","time":0.016200345999990533,"maxTime":0.31943199999841454,"minTime":0.01356099999975413},{"name":"encodeBackslashEscapes","time":0.01431991399999606,"maxTime":0.2639839999992546,"minTime":0.012655999998969492},{"name":"encodeCode","time":0.1769781109999949,"maxTime":0.48939399999835587,"minTime":0.1554969999997411},{"name":"encodeEmailAddress","time":2.848971260999982,"maxTime":482.6867740000016,"minTime":2.1034310000013647},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.06140210999999181,"maxTime":0.4282199999997829,"minTime":0.054543999998713844},{"name":"githubCodeBlocks","time":0.08352940699999999,"maxTime":5.148885999999038,"minTime":0.05574999999953434},{"name":"hashBlock","time":0.035242384999986824,"maxTime":6.322346999999354,"minTime":0.011450999998487532},{"name":"hashElement","time":0.0007398209999955725,"maxTime":0.228423999998995,"minTime":0},{"name":"hashHTMLSpans","time":0.023965240999994423,"maxTime":4.870135000001028,"minTime":0.010548000000198954},{"name":"hashPreCodeTags","time":0.0177119209999928,"maxTime":0.29502299999876413,"minTime":0.015066999998452957},{"name":"headers","time":0.47185469899999044,"maxTime":4.046241999998529,"minTime":0.40471400000024005},{"name":"images","time":0.04015382200000204,"maxTime":0.8353449999995064,"minTime":0.03314899999895715},{"name":"italicsAndBold","time":0.040937056000007944,"maxTime":0.4218909999999596,"minTime":0.03555899999992107},{"name":"lists","time":5.605958104999981,"maxTime":8.2754040000018,"minTime":5.111517999999705},{"name":"outdent","time":0.05058991999998762,"maxTime":0.8519200000009732,"minTime":0.04490099999748054},{"name":"paragraphs","time":1.3683752520000052,"maxTime":2.683230000002368,"minTime":1.221376000001328},{"name":"spanGamut","time":0.6380164189999886,"maxTime":1.4329240000006394,"minTime":0.5689510000011069},{"name":"strikethrough","time":0.00041044099999635366,"maxTime":0.2287259999975504,"minTime":0},{"name":"stripBlankLines","time":0.031698214999982155,"maxTime":0.29773500000010245,"minTime":0.027422999999544118},{"name":"stripLinkDefinitions","time":0.07171796800000084,"maxTime":0.35408800000004703,"minTime":0.06177699999898323},{"name":"tables","time":0.0005409359999939625,"maxTime":0.19889199999670382,"minTime":0},{"name":"unescapeSpecialChars","time":0.0034100999999900523,"maxTime":0.15188100000159466,"minTime":0.0030129999977361877}]}],"1.5.5":[{"suiteName":"Basic","cycles":100,"tests":[{"name":"Simple \"Hello World\"","time":0.3017154600000001,"maxTime":5.968856000000001,"minTime":0.14796299999999718},{"name":"readme.md","time":8.157263590000007,"maxTime":17.988235999999993,"minTime":7.204394999999977}]},{"suiteName":"subParsers","cycles":1000,"tests":[{"name":"hashHTMLBlocks","time":0.6816068189999991,"maxTime":1.094506000000024,"minTime":0.6253030000000308},{"name":"anchors","time":0.2342927859999952,"maxTime":0.5794980000000578,"minTime":0.1910560000001169},{"name":"autoLinks","time":0.014762871999999106,"maxTime":0.18050900000002912,"minTime":0.01295799999979863},{"name":"blockGamut","time":7.3070927989999825,"maxTime":17.844490999999834,"minTime":6.509178000000247},{"name":"blockQuotes","time":0.06523252800000227,"maxTime":0.25795599999946717,"minTime":0.058762999999089516},{"name":"codeBlocks","time":0.07315170800001215,"maxTime":1.051713999999265,"minTime":0.06237900000087393},{"name":"codeSpans","time":0.18133396599998558,"maxTime":0.8983270000007906,"minTime":0.1651399999991554},{"name":"detab","time":0.023979393999999956,"maxTime":0.2088370000001305,"minTime":0.022299000000202795},{"name":"encodeAmpsAndAngles","time":0.01590047000001141,"maxTime":0.2796539999999368,"minTime":0.013861999999789987},{"name":"encodeBackslashEscapes","time":0.014044158999993669,"maxTime":0.3592109999990498,"minTime":0.012655999998969492},{"name":"encodeCode","time":0.1713209560000123,"maxTime":0.5418289999997796,"minTime":0.15368899999884889},{"name":"encodeEmailAddress","time":2.3023639950000105,"maxTime":4.221322999999757,"minTime":2.079922999999326},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.06365613699999631,"maxTime":0.4035089999997581,"minTime":0.05424300000049698},{"name":"githubCodeBlocks","time":0.11150525500000368,"maxTime":6.431128999998691,"minTime":0.0569550000000163},{"name":"hashBlock","time":0.031511962000016866,"maxTime":6.548655999999028,"minTime":0.011150000000270666},{"name":"hashElement","time":0.0007349880000037956,"maxTime":0.22661599999992177,"minTime":0},{"name":"hashHTMLSpans","time":0.03193505000001096,"maxTime":6.133695999998963,"minTime":0.00994399999945017},{"name":"hashPreCodeTags","time":0.017636856999988595,"maxTime":0.3019540000004781,"minTime":0.015067999998791493},{"name":"headers","time":0.4557796079999789,"maxTime":7.748634999999922,"minTime":0.3962759999994887},{"name":"images","time":0.03852289700000438,"maxTime":1.0164559999993799,"minTime":0.03284699999858276},{"name":"italicsAndBold","time":0.0357555800000082,"maxTime":0.4667920000010781,"minTime":0.031038999999509542},{"name":"lists","time":5.111364808999966,"maxTime":11.046619000000646,"minTime":4.623325000000477},{"name":"outdent","time":0.05124681700002475,"maxTime":0.4122480000005453,"minTime":0.04429799999707029},{"name":"paragraphs","time":1.3728050700000132,"maxTime":3.7286149999999907,"minTime":1.2099230000021635},{"name":"spanGamut","time":0.7691525840000031,"maxTime":1.306657000000996,"minTime":0.6686979999976757},{"name":"strikethrough","time":0.0004860790000202542,"maxTime":0.2513269999981276,"minTime":0},{"name":"stripBlankLines","time":0.03095717400000649,"maxTime":0.2920090000006894,"minTime":0.027421999999205582},{"name":"stripLinkDefinitions","time":0.06971120600001814,"maxTime":0.42219200000181445,"minTime":0.06117399999857298},{"name":"tables","time":0.000774782000004052,"maxTime":0.21154800000294927,"minTime":0},{"name":"unescapeSpecialChars","time":0.0036451429999833636,"maxTime":0.18713900000147987,"minTime":0.0027119999977003317}]}],"1.5.4":[{"suiteName":"Basic","cycles":100,"tests":[{"name":"Simple \"Hello World\"","time":0.30990324000000025,"maxTime":5.549075,"minTime":0.14916800000000308},{"name":"readme.md","time":8.072704459999997,"maxTime":17.975579000000003,"minTime":7.220064999999977}]}]} \ No newline at end of file diff --git a/performance.log.md b/performance.log.md index e36f028..ee62931 100644 --- a/performance.log.md +++ b/performance.log.md @@ -1,6 +1,49 @@ # Performance Tests for showdown +## [version 1.5.6](https://github.com/showdownjs/showdown/tree/) + +### Test Suite: Basic (100 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.484|5.497|0.159| +|readme.md|8.624|20.725|7.639| + +### Test Suite: subParsers (1000 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|0.697|1.193|0.637| +|anchors|0.191|0.628|0.159| +|autoLinks|0.017|0.318|0.014| +|blockGamut|7.720|14.917|6.949| +|blockQuotes|0.065|0.236|0.060| +|codeBlocks|0.082|1.078|0.063| +|codeSpans|0.185|0.915|0.168| +|detab|0.025|0.195|0.023| +|encodeAmpsAndAngles|0.016|0.319|0.014| +|encodeBackslashEscapes|0.014|0.264|0.013| +|encodeCode|0.177|0.489|0.155| +|encodeEmailAddress|2.849|482.687|2.103| +|escapeSpecialCharsWithinTagAttributes|0.061|0.428|0.055| +|githubCodeBlocks|0.084|5.149|0.056| +|hashBlock|0.035|6.322|0.011| +|hashElement|0.001|0.228|0.000| +|hashHTMLSpans|0.024|4.870|0.011| +|hashPreCodeTags|0.018|0.295|0.015| +|headers|0.472|4.046|0.405| +|images|0.040|0.835|0.033| +|italicsAndBold|0.041|0.422|0.036| +|lists|5.606|8.275|5.112| +|outdent|0.051|0.852|0.045| +|paragraphs|1.368|2.683|1.221| +|spanGamut|0.638|1.433|0.569| +|strikethrough|0.000|0.229|0.000| +|stripBlankLines|0.032|0.298|0.027| +|stripLinkDefinitions|0.072|0.354|0.062| +|tables|0.001|0.199|0.000| +|unescapeSpecialChars|0.003|0.152|0.003| + + ## [version 1.5.5](https://github.com/showdownjs/showdown/tree/) ### Test Suite: Basic (100 cycles) diff --git a/src/subParsers/anchors.js b/src/subParsers/anchors.js index fc5d092..fbe6eb3 100644 --- a/src/subParsers/anchors.js +++ b/src/subParsers/anchors.js @@ -66,7 +66,12 @@ showdown.subParser('anchors', function (text, options, globals) { // Lastly handle GithubMentions if option is enabled if (options.ghMentions) { - text = text.replace(/(^|\s)(@([a-z\d\-]+))(?=[.!?;,[\]()]|\s|$)/gmi, '$1$2'); + text = text.replace(/(^|\s)(\\)?(@([a-z\d\-]+))(?=[.!?;,[\]()]|\s|$)/gmi, function (wm, st, escape, mentions, username) { + if (escape === '\\') { + return st + mentions; + } + return st + '' + mentions + ''; + }); } text = globals.converter._dispatch('anchors.after', text, options, globals); diff --git a/src/subParsers/ghMentions.js b/src/subParsers/ghMentions.js deleted file mode 100644 index e69de29..0000000 diff --git a/test/features/ghMentions.html b/test/features/ghMentions.html index 3a26c6d..d342cbe 100644 --- a/test/features/ghMentions.html +++ b/test/features/ghMentions.html @@ -1,2 +1,3 @@

hello @tivie how are you?

this email foo@gmail.com is not parsed

+

this @mentions is not parsed also

diff --git a/test/features/ghMentions.md b/test/features/ghMentions.md index 0e61a01..6187b4c 100644 --- a/test/features/ghMentions.md +++ b/test/features/ghMentions.md @@ -1,3 +1,5 @@ hello @tivie how are you? this email foo@gmail.com is not parsed + +this \@mentions is not parsed also