Skip to content

Commit db1bcb9

Browse files
committed
Match statement
1 parent b00c3d9 commit db1bcb9

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
<body>
5757
<header>
58-
<aside>December 10, 2024</aside>
58+
<aside>December 11, 2024</aside>
5959
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
6060
</header>
6161

@@ -1778,7 +1778,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
17781778
<span class="hljs-meta">... </span> parts=[<span class="hljs-string">'/'</span>, <span class="hljs-string">'home'</span>, user, *_]
17791779
<span class="hljs-meta">... </span> ) <span class="hljs-keyword">as</span> p <span class="hljs-keyword">if</span> p.name.lower().startswith(<span class="hljs-string">'readme'</span>) <span class="hljs-keyword">and</span> p.is_file():
17801780
<span class="hljs-meta">... </span> print(<span class="hljs-string">f'<span class="hljs-subst">{p.name}</span> is a readme file that belongs to user <span class="hljs-subst">{user}</span>.'</span>)
1781-
<span class="hljs-string">'README.md is a readme file that belongs to user gto.'</span>
1781+
README.md is a readme file that belongs to user gto.
17821782
</code></pre></div>
17831783

17841784
<div><h2 id="logging"><a href="#logging" name="logging">#</a>Logging</h2><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> logging <span class="hljs-keyword">as</span> log
@@ -2924,7 +2924,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
29242924

29252925

29262926
<footer>
2927-
<aside>December 10, 2024</aside>
2927+
<aside>December 11, 2024</aside>
29282928
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
29292929
</footer>
29302930

parse.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ function modifyPage() {
733733
unindentBanner();
734734
updateDiagrams();
735735
highlightCode();
736+
fixMatchHighlights();
736737
fixPandasDiagram();
737738
removePlotImages();
738739
fixABCSequenceDiv();
@@ -897,6 +898,12 @@ function insertPageBreakBefore(an_id) {
897898
$('<div class="pagebreak"></div>').insertBefore($(an_id).parent())
898899
}
899900

901+
function fixMatchHighlights() {
902+
const line = $(`span:contains(README.md is a readme file that belongs to user gto.)`);
903+
line.after('README.md is a readme file that belongs to user gto.');
904+
line.remove();
905+
}
906+
900907
function fixPandasDiagram() {
901908
const diagram_15 = '┏━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━┓';
902909
$(`code:contains(${diagram_15})`).find(".hljs-keyword:contains(and)").after("and");

0 commit comments

Comments
 (0)