Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Core Grammars:
- fix(ex) adds support for `?'` char literal and missing `defguardp` keyword [Kevin Bloch][]
- fix(diff) fix unified diff hunk header regex to allow unpaired numbers [Chris Wilson][]
- enh(php) support single line and hash comments in attributes, constructor and functions [Antoine Musso][]
- fix(leaf) fix bug in Leaf keyword highlighting [Francesco Paolo Severino][]
- enh(json) add json5 support [Kerry Shetline][]

Documentation:
Expand All @@ -31,6 +32,7 @@ CONTRIBUTORS
[Chris Wilson]: https://github.com/sushicw
[Antoine Musso]: https://github.com/hashar
[Chester Moses]: https://github.com/Chester-Moses-HCL
[Francesco Paolo Severino]: https://github.com/fpseverino
[SungHyun Kim]: https://github.com/witch-factory
[Adam Lui]: https://github.com/adamlui
[Sebastiaan Speck]: https://github.com/sebastiaanspeck
Expand Down
2 changes: 1 addition & 1 deletion src/languages/leaf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function(hljs) {
},
{
scope: 'keyword',
match: LITERALS.join("|"),
match: LITERALS.map(lit => `\\b${lit}\\b`).join("|"),
},
{
scope: 'variable',
Expand Down
2 changes: 1 addition & 1 deletion test/markup/leaf/default.expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<span class="hljs-punctuation">#</span><span class="hljs-keyword">if</span><span class="hljs-params">(<span class="hljs-keyword">count</span><span class="hljs-params">(<span class="hljs-variable">visit</span>)</span> <span class="hljs-operator">==</span> 1)</span><span class="hljs-punctuation">:</span>
Hello new user!
<span class="hljs-punctuation">#</span><span class="hljs-keyword">elseif</span><span class="hljs-params">(<span class="hljs-variable">title</span> <span class="hljs-operator">==</span> <span class="hljs-string">&quot;Welcome back!&quot;</span>)</span><span class="hljs-punctuation">:</span>
<span class="hljs-punctuation">#</span><span class="hljs-keyword">elseif</span><span class="hljs-params">(<span class="hljs-variable">index</span> <span class="hljs-operator">==</span> <span class="hljs-string">&quot;Welcome back!&quot;</span>)</span><span class="hljs-punctuation">:</span>
Hello old user
<span class="hljs-punctuation">#</span><span class="hljs-keyword">else</span><span class="hljs-punctuation">:</span>
Unexpected page!
Expand Down
2 changes: 1 addition & 1 deletion test/markup/leaf/default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#if(count(visit) == 1):
Hello new user!
#elseif(title == "Welcome back!"):
#elseif(index == "Welcome back!"):
Hello old user
#else:
Unexpected page!
Expand Down