Skip to content

Commit

Permalink
[pt] performance improvement attempt
Browse files Browse the repository at this point in the history
* see performance test result from 2017-07-07 for reference.
* revert if no significant performance improvements are achieved.
* this makes this rule's underlining and suggestion odd, but it may be
worth the compromise
  • Loading branch information
TiagoSantos committed Jul 10, 2017
1 parent d4e8952 commit f1c01ba
Showing 1 changed file with 24 additions and 18 deletions.
Expand Up @@ -5800,32 +5800,38 @@ title="Easy editing stylesheet" ?>
<rulegroup id='DOUBLE_PUNCTUATION' name="Pontuação duplicada">
<!-- Created by Tiago F. Santos, Portuguese rule, 2016-10-17 -->
<antipattern><!-- indexes -->
<token regexp='yes'>[.]</token>
<token regexp='yes'>[.]</token>
<token regexp='yes'>[.]</token>
<token regexp='yes'>[.]</token>
<token regexp='yes'>[.]</token>
</antipattern>
<antipattern><!-- ellipsis -->
<token regexp='yes'>[.]</token>
<token regexp='yes'>[.]</token>
<token regexp='yes'>[.]</token>
<token>.</token>
<token>.</token>
<token>.</token>
<token>.</token>
<token>.</token>
</antipattern>
<rule>
<regexp>[.][.][.][.]</regexp>
<pattern>
<token>.</token>
<token>.</token>
<token>.</token>
<token>.</token>
</pattern>
<message>Pontuação duplicada</message>
<suggestion>…</suggestion>
<example correction='…'>A situação financeira era estável<marker>....</marker></example>
</rule>
<rule>
<antipattern><!-- dealt by ellipsis typography rule -->
<token>.</token>
<token>.</token>
<token>.</token>
</antipattern>
<pattern>
<token regexp='yes'>[.]</token>
<token regexp='yes'>[.]</token>
<token>.</token>
<token>.</token>
</pattern>
<message>Pontuação duplicada</message>
<suggestion>.</suggestion>
<suggestion>…</suggestion>
<example correction='.|…'>A situação financeira era estável<marker>..</marker></example>
<example>A situação financeira era estável<marker>...</marker></example>
</rule>
<rule>
<pattern>
Expand Down Expand Up @@ -20600,13 +20606,13 @@ TODO Write better examples

<rule id="SPACE_BEFORE_PUNCTUATION" name="Espaços antes da pontuação">
<!-- Based on German grammar.xml, by Tiago F. Santos, 2017-07-08 -->
<regexp>\b(\p{L}+) ([!?:;,….])</regexp>
<regexp>(\p{L}) ([!?:;,….])</regexp>
<message>Remova o espaço antes da pontuação.</message>
<suggestion>\1\2</suggestion>
<example correction="escapou!">Como é que isto me <marker>escapou !</marker></example>
<example correction="possíveis:">Existem duas estratégias <marker>possíveis :</marker> aproveitar o que existe ou reinventar a roda.</example>
<example correction="escapou!">Como é que isto me <marker>escapou !</marker></example>
<example correction="roda.">Existem duas estratégias possíveis: aproveitar o que existe ou reinventar a <marker>roda .</marker></example>
<example correction="u!">Como é que isto me escapo<marker>u !</marker></example>
<example correction="s:">Existem duas estratégias possívei<marker>s :</marker> aproveitar o que existe ou reinventar a roda.</example>
<example correction="u!">Como é que isto me escapo<marker>u !</marker></example>
<example correction="a.">Existem duas estratégias possíveis: aproveitar o que existe ou reinventar a rod<marker>a .</marker></example>
</rule>

</category>
Expand Down

0 comments on commit f1c01ba

Please sign in to comment.