Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
haampie committed Jun 6, 2024
1 parent 2fab4cf commit c4362f4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ <h2>What's new</h2>
<section>
<h2><code>Spec highlighting</code></h2>
<pre><code data-trim data-noescape class="spec">
$ spack spec --fresh zlib
$ spack spec \
--fresh zlib
Input spec
--------------------------------
- zlib
Expand Down Expand Up @@ -69,7 +70,7 @@ <h2><code>Spec highlighting</code></h2>
QUOTED_VALUE = `('([^']|(?<=\\\\)')*'|\\"([^\\"]|(?<=\\\\)\\")*\\")`
ARCH = `(arch|target|os|platform)=${VALUE}`
KEY_VALUE_PAIR = `${NAME}=(${VALUE}|${QUOTED_VALUE})`
COMMAND_LINE = `^\\$.+$`
COMMAND_LINE = `^\\$.+(\\$)*$`
Reveal.initialize({
highlight: {
beforeHighlight: (hljs) => hljs.registerLanguage("spec", function() {
Expand All @@ -78,7 +79,8 @@ <h2><code>Spec highlighting</code></h2>
contains: [
{
className: "spec-command-line",
begin: COMMAND_LINE
begin: '^\\s*\\$',
end: '(?<!\\\\)$' // allow newlines with \ at the end
},
{
className: 'spec-arch',
Expand Down

0 comments on commit c4362f4

Please sign in to comment.