From 09f8d03ab3fe7767592f429ab8dc69f2860e4183 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 30 Oct 2025 03:20:11 -0700 Subject: [PATCH 1/2] use safe center for content to make mobile breakage less bad --- src/styles/docs/docs.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/docs/docs.css b/src/styles/docs/docs.css index 2980e01..3a646d8 100644 --- a/src/styles/docs/docs.css +++ b/src/styles/docs/docs.css @@ -9,7 +9,7 @@ margin-inline: 0.618rem; margin-top: 3.5rem; display: flex; - justify-content: center; + justify-content: safe center; flex-direction: row; flex-grow: 1; transition: filter 0.3s; From 2086232a7dbe4256511a94cc897bffea1883db46 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 30 Oct 2025 03:45:43 -0700 Subject: [PATCH 2/2] fix parsing @@ modules with >2 segments --- src/config/io/markdown.ts | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/config/io/markdown.ts b/src/config/io/markdown.ts index 841db0a..1708663 100644 --- a/src/config/io/markdown.ts +++ b/src/config/io/markdown.ts @@ -33,35 +33,33 @@ const remarkParseAtTypes: RemarkPlugin<[]> = () => (root: Md.Root): Md.Root => { const node = rawNode as Md.Literal; node.value = node.value.replace( - /@@((?([A-Z]\w*\.)*)(?([A-Z]\w*))(\.(?!\s|$))?)?((?[a-z]\w*)((?\(\))|(?\(s\)))?)?(?=[$.,;:)\s]|$)/g, + /@@(?([A-Z]\w*\.)+)((?[a-z]\w*)((?\(\))|(?\(s\)))?)?(?=[$.,;:)\s]|$)/g, (_full, ...args) => { type Capture = { - module: string | undefined; - type: string | undefined; + path: string | undefined; member: string | undefined; function: string | undefined; signal: string | undefined; }; const groups = args.pop() as Capture; + const pathp = groups.path.split('.').filter(Boolean); + let type = (pathp.length >= 1 ? pathp.pop() : ""); + let module = pathp.join('_'); - if (groups.module) { - groups.module = groups.module.substring( - 0, - groups.module.length - 1 - ); - const isQs = groups.module.startsWith("Quickshell"); - groups.module = `99M${isQs ? "QS" : "QT_qml"}_${groups.module.replace(".", "_")}`; - } else groups.module = ""; // WARNING: rehype parser can't currently handle intra-module links + if (module) { + const isQs = module.startsWith("Quickshell"); + module = `99M${isQs ? "QS" : "QT_qml"}_${module}`; + } else module = ""; // WARNING: rehype parser can't currently handle intra-module links - groups.type = groups.type ? `99N${groups.type}` : ""; + type = type ? `99N${type}` : ""; groups.member = groups.member ? `99V${groups.member}` : ""; - const type = groups.member + const typep = groups.member ? `99T${groups.function ? "func" : groups.signal ? "signal" : "prop"}` : ""; - return `TYPE${groups.module}${groups.type}${groups.member}${type}99TYPE`; + return `TYPE${module}${type}${groups.member}${typep}99TYPE`; } ); }