From 480f6db8096a4b2bd7efbf10eaa763450cf8d9a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 25 Dec 2024 14:29:13 +0100 Subject: [PATCH] Match statement --- README.md | 2 +- parse.js | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 33970c4..b1cf2d2 100644 --- a/README.md +++ b/README.md @@ -2167,7 +2167,7 @@ match : ... parts=['/', 'home', user, *_] ... ) as p if p.name.lower().startswith('readme') and p.is_file(): ... print(f'{p.name} is a readme file that belongs to user {user}.') -'README.md is a readme file that belongs to user gto.' +README.md is a readme file that belongs to user gto. ``` diff --git a/parse.js b/parse.js index e592db8..7ab2986 100755 --- a/parse.js +++ b/parse.js @@ -110,7 +110,7 @@ const MATCH_EXAMPLE = '... parts=[\'/\', \'home\', user, *_]\n' + '... ) as p if p.name.lower().startswith(\'readme\') and p.is_file():\n' + '... print(f\'{p.name} is a readme file that belongs to user {user}.\')\n' + - '\'README.md is a readme file that belongs to user gto.\'\n'; + 'README.md is a readme file that belongs to user gto.\n'; const COROUTINES = 'import asyncio, collections, curses, curses.textpad, enum, random\n' + @@ -733,7 +733,6 @@ function modifyPage() { unindentBanner(); updateDiagrams(); highlightCode(); - fixMatchHighlights(); fixPandasDiagram(); removePlotImages(); fixABCSequenceDiv(); @@ -898,12 +897,6 @@ function insertPageBreakBefore(an_id) { $('
').insertBefore($(an_id).parent()) } -function fixMatchHighlights() { - const line = $(`span:contains(README.md is a readme file that belongs to user gto.)`); - line.after('README.md is a readme file that belongs to user gto.'); - line.remove(); -} - function fixPandasDiagram() { const diagram_15 = '┏━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━┓'; $(`code:contains(${diagram_15})`).find(".hljs-keyword:contains(and)").after("and");