@brillout/docpress 0.3.2 → 0.3.4

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.
@@ -51,14 +51,26 @@ ${headingsExportCode}
51
51
  return codeNew;
52
52
  }
53
53
  function parseMarkdownHeading(line) {
54
+ var _a;
54
55
  const [lineBegin, ...lineWords] = line.split(" ");
55
56
  assert(lineBegin.split("#").join("") === "", { line, lineWords });
56
57
  const headingLevel = lineBegin.length;
57
58
  const titleMdx = lineWords.join(" ");
58
59
  assert(!titleMdx.startsWith(" "), { line, lineWords });
59
60
  assert(titleMdx, { line, lineWords });
60
- const headingId = determineSectionUrlHash(titleMdx);
61
- const title = titleMdx;
61
+ const headingMdx = {
62
+ title: titleMdx,
63
+ anchor: titleMdx
64
+ };
65
+ {
66
+ const customAnchor = (_a = /(?<={#).*(?=})/g.exec(titleMdx)) == null ? void 0 : _a[0];
67
+ if (customAnchor) {
68
+ headingMdx.anchor = customAnchor;
69
+ headingMdx.title = titleMdx.replace(/{#.*}/g, "");
70
+ }
71
+ }
72
+ const headingId = determineSectionUrlHash(headingMdx.anchor);
73
+ const title = headingMdx.title;
62
74
  const titleParsed = parseTitle(title);
63
75
  assert(headingId === null || headingId.length > 0);
64
76
  const headingAttrId = headingId === null ? "" : ` id="${headingId}"`;
package/dist/cli/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  vite_config_default
3
- } from "../chunk-Y6IB6PHW.js";
3
+ } from "../chunk-REPAOCCC.js";
4
4
  import "../chunk-MWMYEK3D.js";
5
5
  import "../chunk-2ZTPUQGS.js";
6
6
  import "../chunk-3QC7HYIF.js";
@@ -16,7 +16,7 @@ Error.stackTraceLimit = Infinity;
16
16
  cli();
17
17
  async function cli() {
18
18
  if (isDev) {
19
- await import("../devServer-TUR62GMN.js");
19
+ await import("../devServer-MLU3NNYM.js");
20
20
  } else if (isBuild) {
21
21
  await build(vite_config_default);
22
22
  await build({ ...vite_config_default, build: { ssr: true } });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  vite_config_default
3
- } from "./chunk-Y6IB6PHW.js";
3
+ } from "./chunk-REPAOCCC.js";
4
4
  import "./chunk-MWMYEK3D.js";
5
5
  import "./chunk-2ZTPUQGS.js";
6
6
  import "./chunk-3QC7HYIF.js";
@@ -97,6 +97,11 @@ body {
97
97
  font-style: oblique 0deg 12deg;
98
98
  src: url(../Inter-Var-IOAEQULN.ttf) format("truetype-variations");
99
99
  }
100
+ em,
101
+ i {
102
+ font-variation-settings: "slnt" -10;
103
+ font-style: normal;
104
+ }
100
105
 
101
106
  /* src/css/code/inline.css */
102
107
  code {
@@ -311,11 +311,11 @@ function DetachedPageNote() {
311
311
  }
312
312
  }, /* @__PURE__ */ React3.createElement(Emoji, {
313
313
  name: "info"
314
- }), " ", /* @__PURE__ */ React3.createElement("b", null, /* @__PURE__ */ React3.createElement("em", null, "Detached")), /* @__PURE__ */ React3.createElement("span", {
314
+ }), " ", /* @__PURE__ */ React3.createElement("em", null, "Detached"), /* @__PURE__ */ React3.createElement("span", {
315
315
  style: {
316
316
  opacity: 0.8
317
317
  }
318
- }, " ", "\u2014 this page isn't listed in the navigation menu below."));
318
+ }, " ", "\u2014 this page isn't listed in the navigation below."));
319
319
  }
320
320
 
321
321
  // src/MobileHeader.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "exports": {
5
5
  "./renderer/_default.page.server.js": "./dist/renderer/_default.page.server.js",
6
6
  "./renderer/_default.page.client.js": "./dist/renderer/_default.page.client.js",