@kenjura/ursa 0.84.0 → 0.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -50,6 +50,21 @@ h1 {
|
|
|
50
50
|
text-overflow: ellipsis;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
figure {
|
|
54
|
+
margin: 0.5rem 0;
|
|
55
|
+
padding: 0;
|
|
56
|
+
max-width: 300px;
|
|
57
|
+
float: left;
|
|
58
|
+
margin-right: 1.5rem;
|
|
59
|
+
margin-bottom: 0.5rem;
|
|
60
|
+
|
|
61
|
+
&:nth-of-type(even) {
|
|
62
|
+
float: right;
|
|
63
|
+
margin-left: 1.5rem;
|
|
64
|
+
margin-right: 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
53
68
|
nav#nav-global {
|
|
54
69
|
background-color: var(--nav-top-bg);
|
|
55
70
|
height: var(--global-nav-height);
|
package/package.json
CHANGED
package/src/dev.js
CHANGED
|
@@ -569,10 +569,12 @@ async function wrapInTemplate(body, title, fileMeta, urlPath, sourcePath, hydrat
|
|
|
569
569
|
// Resolve relative URLs
|
|
570
570
|
finalHtml = resolveRelativeUrls(finalHtml, docUrlPath);
|
|
571
571
|
|
|
572
|
-
// Mark inactive links
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
572
|
+
// Mark inactive links + rewrite .md/.mdx → .html. We always run this even
|
|
573
|
+
// before validPaths is ready, because the optimistic .md→.html conversion
|
|
574
|
+
// inside resolveHref does not require validPaths. Without this, links to
|
|
575
|
+
// markdown files served before background caches finish would not be
|
|
576
|
+
// rewritten and the browser would request the source .md file directly.
|
|
577
|
+
finalHtml = markInactiveLinks(finalHtml, validPaths || new Map(), docUrlPath, false);
|
|
576
578
|
|
|
577
579
|
return finalHtml;
|
|
578
580
|
}
|
|
@@ -12,6 +12,25 @@ import remarkSupersub from "remark-supersub";
|
|
|
12
12
|
import remarkGfm from "remark-gfm";
|
|
13
13
|
import { visit } from "unist-util-visit";
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* remark-definition-list only registers the `:` (charcode 58) marker, but
|
|
17
|
+
* PHP Markdown Extra (and markdown-it-deflist) also support `~` (charcode 126).
|
|
18
|
+
* This sibling plugin must run AFTER remarkDefinitionList; it locates the
|
|
19
|
+
* already-registered defList construct and re-registers it under `~` so that
|
|
20
|
+
* .mdx files have parity with .md files.
|
|
21
|
+
*/
|
|
22
|
+
function remarkDefinitionListTildeMarker() {
|
|
23
|
+
const data = this.data();
|
|
24
|
+
const micromarkExtensions = data.micromarkExtensions ?? (data.micromarkExtensions = []);
|
|
25
|
+
for (const ext of micromarkExtensions) {
|
|
26
|
+
const construct = ext?.document?.[58];
|
|
27
|
+
if (construct) {
|
|
28
|
+
micromarkExtensions.push({ document: { 126: construct } });
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
15
34
|
/**
|
|
16
35
|
* Custom remark plugin that converts container directives (:::name ... :::)
|
|
17
36
|
* into <aside> HTML elements, matching the markdown-it-container behavior
|
|
@@ -122,6 +141,7 @@ export async function renderMDX({ source, filePath, sourceRoot, hydrate = false
|
|
|
122
141
|
remarkDirective,
|
|
123
142
|
remarkAsideContainers,
|
|
124
143
|
remarkDefinitionList,
|
|
144
|
+
remarkDefinitionListTildeMarker,
|
|
125
145
|
remarkSupersub,
|
|
126
146
|
];
|
|
127
147
|
// remark-definition-list needs custom handlers for remark-rehype conversion
|