From dd555580e19031cab0604f3411e62d2f02b6e7f8 Mon Sep 17 00:00:00 2001 From: Mackie Burgess <50265505+mackieburgess@users.noreply.github.com> Date: Thu, 10 Oct 2024 19:23:08 +0100 Subject: [PATCH] docs: fix admonition regular expression (#2702) From #2699, Co-authored by @monooleate Added `margin-bottom` to better visually align icon with title. --- www/deno.lock | 79 ++++++++++++++++++++++++++++++++++++++++- www/static/markdown.css | 1 + www/utils/markdown.ts | 2 +- 3 files changed, 80 insertions(+), 2 deletions(-) diff --git a/www/deno.lock b/www/deno.lock index 707b42442d6..56fc35d31ba 100644 --- a/www/deno.lock +++ b/www/deno.lock @@ -1,15 +1,25 @@ { "version": "4", "specifiers": { + "jsr:@luca/esbuild-deno-loader@~0.10.3": "0.10.3", + "jsr:@std/assert@0.221": "0.221.0", + "jsr:@std/assert@~0.213.1": "0.213.1", "jsr:@std/collections@^1.0.5": "1.0.7", + "jsr:@std/crypto@*": "1.0.3", + "jsr:@std/datetime@0.224": "0.224.5", "jsr:@std/encoding@*": "1.0.5", + "jsr:@std/encoding@0.213": "0.213.1", "jsr:@std/fmt@*": "1.0.2", "jsr:@std/front-matter@~0.224.2": "0.224.3", "jsr:@std/fs@*": "1.0.4", "jsr:@std/html@~0.224.2": "0.224.2", + "jsr:@std/jsonc@0.213": "0.213.1", + "jsr:@std/jsonc@0.221": "0.221.0", "jsr:@std/media-types@0.221": "0.221.0", "jsr:@std/path@*": "1.0.6", + "jsr:@std/path@0.213": "0.213.1", "jsr:@std/path@^1.0.6": "1.0.6", + "jsr:@std/semver@0.224": "0.224.3", "jsr:@std/toml@^1.0.0-rc.3": "1.0.1", "jsr:@std/yaml@^1.0.0-rc.1": "1.0.5", "npm:@preact/signals@1.3.0": "1.3.0_preact@10.24.1", @@ -29,9 +39,32 @@ "npm:tailwindcss@3.4.1": "3.4.1_postcss@8.4.47" }, "jsr": { + "@luca/esbuild-deno-loader@0.10.3": { + "integrity": "32fc93f7e7f78060234fd5929a740668aab1c742b808c6048b57f9aaea514921", + "dependencies": [ + "jsr:@std/encoding@0.213", + "jsr:@std/jsonc@0.213", + "jsr:@std/path@0.213" + ] + }, + "@std/assert@0.213.1": { + "integrity": "24c28178b30c8e0782c18e8e94ea72b16282207569cdd10ffb9d1d26f2edebfe" + }, + "@std/assert@0.221.0": { + "integrity": "a5f1aa6e7909dbea271754fd4ab3f4e687aeff4873b4cef9a320af813adb489a" + }, "@std/collections@1.0.7": { "integrity": "6cff6949907372564735e25a5c6a7945d67cc31913b1b4d1278d08c2a5a3291d" }, + "@std/crypto@1.0.3": { + "integrity": "a2a32f51ddef632d299e3879cd027c630dcd4d1d9a5285d6e6788072f4e51e7f" + }, + "@std/datetime@0.224.5": { + "integrity": "363fca6e2e46c1e85139c10ba77745d25c0936abd112b8bfdc9b8fc3615added" + }, + "@std/encoding@0.213.1": { + "integrity": "fcbb6928713dde941a18ca5db88ca1544d0755ec8fb20fe61e2dc8144b390c62" + }, "@std/encoding@1.0.5": { "integrity": "ecf363d4fc25bd85bd915ff6733a7e79b67e0e7806334af15f4645c569fefc04" }, @@ -54,12 +87,33 @@ "@std/html@0.224.2": { "integrity": "2f7bfd71081fad988af9ce991750ed1574917dc8e6fae0e151987ea020d1e21a" }, + "@std/jsonc@0.213.1": { + "integrity": "5578f21aa583b7eb7317eed077ffcde47b294f1056bdbb9aacec407758637bfe", + "dependencies": [ + "jsr:@std/assert@~0.213.1" + ] + }, + "@std/jsonc@0.221.0": { + "integrity": "097f41a228cf9959a1de4f7638a0cc81a69d6580766f6c84a32959429501f284", + "dependencies": [ + "jsr:@std/assert@0.221" + ] + }, "@std/media-types@0.221.0": { "integrity": "572addcbda2a21367c1f8eaa8c72fea6654b50779027dbde9f693aaa4bac30c3" }, + "@std/path@0.213.1": { + "integrity": "f187bf278a172752e02fcbacf6bd78a335ed320d080a7ed3a5a59c3e88abc673", + "dependencies": [ + "jsr:@std/assert@~0.213.1" + ] + }, "@std/path@1.0.6": { "integrity": "ab2c55f902b380cf28e0eec501b4906e4c1960d13f00e11cfbcd21de15f18fed" }, + "@std/semver@0.224.3": { + "integrity": "7bb34b5ad46de2c0c73de0ca3e30081ef64b4361f66abd57c84ff1011c6a1233" + }, "@std/toml@1.0.1": { "integrity": "b55b407159930f338d384b1f8fd317c8e8a35e27ebb8946155f49e3a158d16c4", "dependencies": [ @@ -1199,8 +1253,31 @@ } }, "remote": { + "https://deno.land/std@0.120.0/async/deadline.ts": "1d6ac7aeaee22f75eb86e4e105d6161118aad7b41ae2dd14f4cfd3bf97472b93", + "https://deno.land/std@0.120.0/async/debounce.ts": "b2f693e4baa16b62793fd618de6c003b63228db50ecfe3bd51fc5f6dc0bc264b", + "https://deno.land/std@0.120.0/async/deferred.ts": "ab60d46ba561abb3b13c0c8085d05797a384b9f182935f051dc67136817acdee", + "https://deno.land/std@0.120.0/async/delay.ts": "f2d8ccaa8ebc26594bd8b0989edfd8a96257a714c1dee2fb54d986e5bdd840ac", + "https://deno.land/std@0.120.0/async/mod.ts": "78425176fabea7bd1046ce3819fd69ce40da85c83e0f174d17e8e224a91f7d10", + "https://deno.land/std@0.120.0/async/mux_async_iterator.ts": "62abff3af9ff619e8f2adc96fc70d4ca020fa48a50c23c13f12d02ed2b760dbe", + "https://deno.land/std@0.120.0/async/pool.ts": "353ce4f91865da203a097aa6f33de8966340c91b6f4a055611c8c5d534afd12f", + "https://deno.land/std@0.120.0/async/tee.ts": "3e9f2ef6b36e55188de16a667c702ace4ad0cf84e3720379160e062bf27348ad", + "https://deno.land/std@0.120.0/http/http_status.ts": "2ff185827bff21c7be2807fcb09a6a2166464ba57fcd94afe805abab8e09070a", + "https://deno.land/std@0.120.0/http/server.ts": "d0be8a9da160255623e645f5b515fa1c6b65eecfbb9cad87ef8002d4f8d56616", + "https://deno.land/std@0.143.0/_util/assert.ts": "e94f2eb37cebd7f199952e242c77654e43333c1ac4c5c700e929ea3aa5489f74", + "https://deno.land/std@0.143.0/datetime/formatter.ts": "7c8e6d16a0950f400aef41b9f1eb9168249869776ec520265dfda785d746589e", + "https://deno.land/std@0.143.0/datetime/mod.ts": "dcab9ae7be83cbf74b7863e83bd16e7c646a8dea2f019092905630eb7a545739", + "https://deno.land/std@0.143.0/datetime/tokenizer.ts": "7381e28f6ab51cb504c7e132be31773d73ef2f3e1e50a812736962b9df1e8c47", + "https://deno.land/std@0.143.0/http/cookie.ts": "526f27762fad7bf84fbe491de7eba7c406057501eec6edcad7884a16b242fddf", + "https://deno.land/x/case@2.1.1/lowerCase.ts": "86d5533f9587ed60003181591e40e648838c23f371edfa79d00288153d113b16", + "https://deno.land/x/case@2.1.1/normalCase.ts": "6a8b924da9ab0790d99233ae54bfcfc996d229cb91b2533639fe20972cc33dac", + "https://deno.land/x/case@2.1.1/snakeCase.ts": "ee2ab4e2c931d30bb79190d090c21eb5c00d1de1b7a9a3e7f33e035ae431333b", + "https://deno.land/x/case@2.1.1/types.ts": "8e2bd6edaa27c0d1972c0d5b76698564740f37b4d3787d58d1fb5f48de611e61", + "https://deno.land/x/case@2.1.1/vendor/camelCaseRegexp.ts": "7d9ff02aad4ab6429eeab7c7353f7bcdd6cc5909a8bd3dda97918c8bbb7621ae", + "https://deno.land/x/case@2.1.1/vendor/camelCaseUpperRegexp.ts": "292de54a698370f90adcdf95727993d09888b7f33d17f72f8e54ba75f7791787", + "https://deno.land/x/case@2.1.1/vendor/nonWordRegexp.ts": "c1a052629a694144b48c66b0175a22a83f4d61cb40f4e45293fc5d6b123f927e", "https://esm.sh/@docsearch/js@3.5.2?target=es2020": "f23fa2d5db04362149b5d03b2a274d850f7ad05c41625d508be170d0a2d9b1b1", - "https://esm.sh/v135/@docsearch/js@3.5.2/es2020/js.mjs": "072160862406760a27ba8c4592b42d6c4b8fab7a24c5ce265732f812eca867e6" + "https://esm.sh/v135/@docsearch/js@3.5.2/es2020/js.mjs": "072160862406760a27ba8c4592b42d6c4b8fab7a24c5ce265732f812eca867e6", + "https://raw.githubusercontent.com/denoland/ga4/main/mod.ts": "36f72ba1c90b5ebdb811427f367cd95fa6772d2de2fb45d6e57550501ee6d476" }, "workspace": { "dependencies": [ diff --git a/www/static/markdown.css b/www/static/markdown.css index 4fde3fb8a92..db80b246766 100644 --- a/www/static/markdown.css +++ b/www/static/markdown.css @@ -617,6 +617,7 @@ margin-right: 0.25rem; width: 1.2em; height: 1.2em; + margin-bottom: 0.25rem; } .markdown-body blockquote.warn { border-color: #ff9100; diff --git a/www/utils/markdown.ts b/www/utils/markdown.ts index 1602308ab30..89d7bb76cb1 100644 --- a/www/utils/markdown.ts +++ b/www/utils/markdown.ts @@ -18,7 +18,7 @@ const slugger = new GitHubSlugger(); Marked.marked.use(mangle()); -const ADMISSION_REG = /^

\[(info|warn|tip)\]:\s/; +const ADMISSION_REG = /^\[(info|warn|tip)\]:\s/; export interface MarkdownHeading { id: string;