Skip to content

Commit

Permalink
Merge pull request #2444 from unxed/smarty_fix
Browse files Browse the repository at this point in the history
backports from colorer
  • Loading branch information
elfmz authored Oct 19, 2024
2 parents 27f1ba9 + 42dfea8 commit cab1a1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions colorer/configs/base/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
- [smarty] fixed the work of smarty templates
- [markdown] amend emphasis with underscores
- [markdown] fix trailing spaces in em and strong
- [smarty] fixed working with nested brackets
- [smarty] literal block - text only

### Changed
- Simplified catalog.xml.
Expand Down
11 changes: 9 additions & 2 deletions colorer/configs/base/hrc/inet/smarty.hrc
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
</scheme>

<scheme name="Script">
<block start="/\s*\b((block|capture|function|for\b|literal|nocache|setfilter|strip|while))\b/" end="/(\/\Y2)/"
<block start="/\s*\b((block|capture|function|for\b|nocache|setfilter|strip|while))\b/" end="/(\/\Y2)/"
region01="PairStart" region10="PairEnd"
region02="def:Keyword" region11="def:Keyword"
scheme="Script" priority="low"
Expand Down Expand Up @@ -281,6 +281,13 @@

<scheme name="Insertion">
<!--<inherit scheme="smartyEscape" />-->
<block start="/(\{)((literal))(\})/" end="/(\{)((\/literal))(\})/"
region01="OpenTag" region11="OpenTag"
region02="def:PairStart" region12="def:PairEnd"
region04="OpenTag" region14="OpenTag"
region03="def:Keyword" region13="def:Keyword"
scheme="asp:html" priority="normal" content-priority="normal"
/>
<inherit scheme="smartyComment" />
<inherit scheme="smartyPhpInsertion"/>

Expand All @@ -292,7 +299,7 @@
</scheme>

<scheme name="InverseInsertion">
<block start="/(\})/" end="/(\{)/" scheme="html"
<block start="/(\})/" end="/(\{)\M\S/" scheme="html"
priority="low" region="Text" inner-region="yes"
region00="Insertion" region10="Insertion"
region01="OpenTag" region11="OpenTag"
Expand Down

0 comments on commit cab1a1e

Please sign in to comment.