flex-md 4.2.6 → 4.2.8
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.
- package/dist/md/parse.js +4 -8
- package/package.json +2 -2
package/dist/md/parse.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MarkdownParser } from "nx-md-parser";
|
|
2
2
|
export function normalizeName(s) {
|
|
3
3
|
return s.trim().replace(/\s+/g, " ").toLowerCase();
|
|
4
4
|
}
|
|
@@ -158,11 +158,7 @@ export function isIssuesEnvelopeCheck(md) {
|
|
|
158
158
|
export function markdownToJson(md) {
|
|
159
159
|
// Robustly handle both actual newlines and literal \n (common in LLM JSON outputs)
|
|
160
160
|
const normalizedMd = (md || "").replace(/\\n/g, "\n");
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
const key = toCamelCase(sec.heading.name);
|
|
165
|
-
result[key] = sec.body.trim();
|
|
166
|
-
}
|
|
167
|
-
return result;
|
|
161
|
+
// Use the powerful nx-md-parser for robust section detection
|
|
162
|
+
const sections = MarkdownParser.parseSections(normalizedMd);
|
|
163
|
+
return MarkdownParser.sectionsToObject(sections);
|
|
168
164
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flex-md",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.8",
|
|
4
4
|
"description": "Parse and stringify FlexMD: semi-structured Markdown with three powerful layers - Frames, Output Format Spec (OFS), and Detection/Extraction.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -50,6 +50,6 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"nd": "^1.2.0",
|
|
52
52
|
"nx-helpers": "^1.5.0",
|
|
53
|
-
"nx-md-parser": "^2.0.
|
|
53
|
+
"nx-md-parser": "^2.0.2"
|
|
54
54
|
}
|
|
55
55
|
}
|