<table><tr><td style="">nibags created this revision.<br />nibags added reviewers: Framework: Syntax Highlighting, cullmann, dhaumann.<br />Herald added projects: Kate, Frameworks.<br />Herald added subscribers: kde-frameworks-devel, kwrite-devel.<br />nibags requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D19328">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The Mustache highlighting has been modified, so as to also highlight template files and make it more complete (previously, this highlighter was only used within HTML highlighting, in the <script> tag). <br />
I have taken as reference the Mustache highlight files for Vim [1] and Atom [2], and the documentation of Musatche and Handlebars.</p>
<p><strong>Changes:</strong></p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Fix and simplify code: within <script>, in normal HTML files, it's not necessary to highlight JavaScript code, so that part is removed.</li>
<li class="remarkup-list-item">Highlight full HTML files, such as Mustache templates. That is, the highlighter is now not hidden, but it's applied to Mustache/Handlebars/Ractive template files.</li>
<li class="remarkup-list-item">Rename: MustacheJS -> Mustache/Handlebars (HTML)</li>
<li class="remarkup-list-item">Improve support for Handlebars [3].</li>
<li class="remarkup-list-item">In 'html.xml', also highlight HTML templates in the <script> tags (with <tt style="background: #ebebeb; font-size: 13px;">type="text/html"</tt>) [4].</li>
</ul>
<p><strong>Sources:</strong></p>
<ul class="remarkup-list">
<li class="remarkup-list-item">[1] <a href="https://github.com/mustache/vim-mustache-handlebars" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/mustache/vim-mustache-handlebars</a></li>
<li class="remarkup-list-item">[2] <a href="https://github.com/atom/language-mustache" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/atom/language-mustache</a></li>
<li class="remarkup-list-item">[3] <a href="https://handlebarsjs.com/" class="remarkup-link" target="_blank" rel="noreferrer">https://handlebarsjs.com/</a></li>
<li class="remarkup-list-item">[4] <a href="https://stackoverflow.com/questions/5679220/how-does-html-tags-work-inside-script-tag" class="remarkup-link" target="_blank" rel="noreferrer">https://stackoverflow.com/questions/5679220/how-does-html-tags-work-inside-script-tag</a></li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>BRANCH</strong><div><div>update-mustache</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19328">https://phabricator.kde.org/D19328</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/folding/example.rmd.fold<br />
autotests/folding/highlight.php.fold<br />
autotests/folding/test.htm.fold<br />
autotests/folding/test.markdown.fold<br />
autotests/folding/test.mustache.fold<br />
autotests/html/highlight.php.html<br />
autotests/html/test.htm.html<br />
autotests/html/test.mustache.html<br />
autotests/input/test.htm<br />
autotests/input/test.mustache<br />
autotests/reference/highlight.php.ref<br />
autotests/reference/test.htm.ref<br />
autotests/reference/test.mustache.ref<br />
autotests/syntaxrepository_test.cpp<br />
data/CMakeLists.txt<br />
data/syntax/html.xml<br />
data/syntax/mustache-js.xml<br />
data/syntax/mustache.xml</div></div></div><br /><div><strong>To: </strong>nibags, Framework: Syntax Highlighting, cullmann, dhaumann<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>