@tnotesjs/core 0.6.0 → 0.6.1

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.
@@ -78,7 +78,7 @@ function normalizeHeadings(lines) {
78
78
  const match = line.match(/^(#{2,6})\s+(.+?)\s*#*\s*$/);
79
79
  if (!match) continue;
80
80
  const level = match[1].length;
81
- const plainText = match[2].replace(/^\d+(?:\.\d+)*\.\s+/, "").trim();
81
+ const plainText = match[2].replace(/^\d+(?:\.\d+)+\.?\s+|^\d+\.\s+/, "").trim();
82
82
  let text = plainText;
83
83
  if (level === 2) {
84
84
  counters.h2 += 1;
@@ -78,7 +78,7 @@ function normalizeHeadings(lines) {
78
78
  const match = line.match(/^(#{2,6})\s+(.+?)\s*#*\s*$/);
79
79
  if (!match) continue;
80
80
  const level = match[1].length;
81
- const plainText = match[2].replace(/^\d+(?:\.\d+)*\.\s+/, "").trim();
81
+ const plainText = match[2].replace(/^\d+(?:\.\d+)+\.?\s+|^\d+\.\s+/, "").trim();
82
82
  let text = plainText;
83
83
  if (level === 2) {
84
84
  counters.h2 += 1;
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkIHFUHB4Jcjs = require('../chunk-IHFUHB4J.cjs');
5
+ var _chunk5F5RJ2HVcjs = require('../chunk-5F5RJ2HV.cjs');
6
6
  require('../chunk-HXED7KVT.cjs');
7
7
 
8
8
  // markdown/components.ts
@@ -79,4 +79,4 @@ function findTNotesComponent(name) {
79
79
 
80
80
 
81
81
 
82
- exports.NOTE_TOC_END_TAG = _chunkIHFUHB4Jcjs.NOTE_TOC_END_TAG; exports.NOTE_TOC_START_TAG = _chunkIHFUHB4Jcjs.NOTE_TOC_START_TAG; exports.TNOTES_COMPONENTS = TNOTES_COMPONENTS; exports.findTNotesComponent = findTNotesComponent; exports.formatTNotesNote = _chunkIHFUHB4Jcjs.formatTNotesNote;
82
+ exports.NOTE_TOC_END_TAG = _chunk5F5RJ2HVcjs.NOTE_TOC_END_TAG; exports.NOTE_TOC_START_TAG = _chunk5F5RJ2HVcjs.NOTE_TOC_START_TAG; exports.TNOTES_COMPONENTS = TNOTES_COMPONENTS; exports.findTNotesComponent = findTNotesComponent; exports.formatTNotesNote = _chunk5F5RJ2HVcjs.formatTNotesNote;
@@ -2,7 +2,7 @@ import {
2
2
  NOTE_TOC_END_TAG,
3
3
  NOTE_TOC_START_TAG,
4
4
  formatTNotesNote
5
- } from "../chunk-UNFSW5C2.js";
5
+ } from "../chunk-56PKXCOX.js";
6
6
  import "../chunk-CZXRQPFJ.js";
7
7
 
8
8
  // markdown/components.ts
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkIHFUHB4Jcjs = require('../chunk-IHFUHB4J.cjs');
3
+ var _chunk5F5RJ2HVcjs = require('../chunk-5F5RJ2HV.cjs');
4
4
 
5
5
 
6
6
 
@@ -706,7 +706,7 @@ var Workspace = class {
706
706
  const config = requireConfig(snapshot);
707
707
  const note = findNote(snapshot, input.noteUuid);
708
708
  assertRevision(note.revision, input.expectedRevision, "\u7B14\u8BB0");
709
- const formatted = await _chunkIHFUHB4Jcjs.formatTNotesNote.call(void 0, {
709
+ const formatted = await _chunk5F5RJ2HVcjs.formatTNotesNote.call(void 0, {
710
710
  content: input.content,
711
711
  noteIndex: note.index,
712
712
  title: note.title,
@@ -763,7 +763,7 @@ var Workspace = class {
763
763
  };
764
764
  const readmePath = _path2.default.join(directoryPath, "README.md");
765
765
  const configPath = _path2.default.join(directoryPath, ".tnotes.json");
766
- const formatted = await _chunkIHFUHB4Jcjs.formatTNotesNote.call(void 0, {
766
+ const formatted = await _chunk5F5RJ2HVcjs.formatTNotesNote.call(void 0, {
767
767
  content: _chunk3R7QSABBcjs.getNewNoteReadmeBody.call(void 0, ),
768
768
  noteIndex: index,
769
769
  title,
@@ -845,7 +845,7 @@ var Workspace = class {
845
845
  if (error instanceof WorkspaceError) throw error;
846
846
  }
847
847
  const currentContent = await _promises2.default.readFile(note.readmePath, "utf8");
848
- const formatted = await _chunkIHFUHB4Jcjs.formatTNotesNote.call(void 0, {
848
+ const formatted = await _chunk5F5RJ2HVcjs.formatTNotesNote.call(void 0, {
849
849
  content: currentContent,
850
850
  noteIndex: note.index,
851
851
  title,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  formatTNotesNote
3
- } from "../chunk-UNFSW5C2.js";
3
+ } from "../chunk-56PKXCOX.js";
4
4
  import {
5
5
  TOC_INDENT_SPACES,
6
6
  adjustTocLineIndexAfterSubtreeRemoval,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tnotesjs/core",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "TNotes 知识库核心框架 —— 基于 VitePress 的笔记管理系统",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.17.1",
@@ -61,7 +61,7 @@
61
61
  "vue": "^3.5.0"
62
62
  },
63
63
  "dependencies": {
64
- "@tnotesjs/mindmap-core": "^0.2.0",
64
+ "@tnotesjs/mindmap-core": "^0.2.1",
65
65
  "echarts": "^6.0.0",
66
66
  "github-slugger": "^2.0.0",
67
67
  "markdown-it-container": "^4.0.0",