@dogsbay/render-html 0.2.0-beta.126 → 0.2.0-beta.128

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.
Files changed (2) hide show
  1. package/dist/render.js +4 -0
  2. package/package.json +4 -4
package/dist/render.js CHANGED
@@ -98,6 +98,10 @@ function inline(n, ctx) {
98
98
  case "code":
99
99
  return decorate(`<code>${esc(n.text)}</code>`, n);
100
100
  case "link": {
101
+ // Inside a whole-card link, a link is its text: a browser ends the outer <a> at an inner one,
102
+ // and the rest of the card falls out of the link
103
+ if (ctx.inLink)
104
+ return renderInline(n.children, ctx);
101
105
  const href = linkUrl(n.href, ctx);
102
106
  const external = /^[a-z][a-z0-9+.-]*:|^\/\//i.test(href) && !href.startsWith("mailto:");
103
107
  // An inline `:button`: Button.astro's classes at its small size, as the Astro pipeline renders it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogsbay/render-html",
3
- "version": "0.2.0-beta.126",
3
+ "version": "0.2.0-beta.128",
4
4
  "description": "Dogsbay MD TreeNode → HTML with the Astro components' markup and classes. No highlighter, math or CSS compiler unless you pass one; Worker- and browser-safe",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -30,9 +30,9 @@
30
30
  "dependencies": {
31
31
  "htmlparser2": "^10.1.0",
32
32
  "markdown-it": "^14.3.0",
33
- "@dogsbay/serialize-core": "0.2.0-beta.126",
34
- "@dogsbay/types": "0.2.0-beta.126",
35
- "@dogsbay/format-dogsbay-md": "0.2.0-beta.126"
33
+ "@dogsbay/format-dogsbay-md": "0.2.0-beta.128",
34
+ "@dogsbay/serialize-core": "0.2.0-beta.128",
35
+ "@dogsbay/types": "0.2.0-beta.128"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "katex": "^0.16.0"