@ai-matrx/print 0.8.5 → 0.8.7
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/CHANGELOG.md +24 -0
- package/dist/document.cjs +2 -1
- package/dist/document.cjs.map +1 -1
- package/dist/document.js +2 -1
- package/dist/document.js.map +1 -1
- package/dist/markdown.cjs +2 -1
- package/dist/markdown.cjs.map +1 -1
- package/dist/markdown.js +2 -1
- package/dist/markdown.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.7
|
|
4
|
+
|
|
5
|
+
- **Fixed: hidden reasoning merged two paragraphs.** `removeThinkingContent`
|
|
6
|
+
replaced every `<thinking>` / `<think>` / `<reasoning>` section with one line
|
|
7
|
+
break, so a section standing between two paragraphs (blank lines around it)
|
|
8
|
+
joined them into one on screen. A section with a blank line on either side
|
|
9
|
+
now leaves a paragraph break; one inside a paragraph still leaves a line
|
|
10
|
+
break (verify-RC-B5 round 3 F6).
|
|
11
|
+
- Consumer action: none — refresh to latest.
|
|
12
|
+
|
|
13
|
+
## 0.8.6
|
|
14
|
+
|
|
15
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
16
|
+
`git diff npm/print/v0.8.5..npm/print/v0.8.6 -- apps/shared/print`).
|
|
17
|
+
No source changes intended and no consumer action required.
|
|
18
|
+
|
|
3
19
|
## 0.8.5
|
|
4
20
|
|
|
5
21
|
- **Word tables use content-aware column widths** (the same rule as the PDF,
|
|
6
22
|
now shared in `src/document/layout.ts`; fixed table layout). A 10-column
|
|
7
23
|
landscape table no longer splits its width equally.
|
|
8
24
|
- A `$$...$$` placeholder in prose prints as text (via content-ir's rule).
|
|
25
|
+
- **Fixed: one inline triple backtick turned off math for the rest of the
|
|
26
|
+
document** ("(in a ```python fence)" mid-sentence → 0 formulas). Print no
|
|
27
|
+
longer keeps its own fence/code/math detection: `extractMath` takes the
|
|
28
|
+
shared tokenizer's complete `math_block`/`math_inline` islands
|
|
29
|
+
(`tokenizeSource` + `listIslands` from `@ai-matrx/content-ir/source`), so
|
|
30
|
+
print, the renderer and the editor agree on what is math. Guard tests: inline
|
|
31
|
+
```, ~~~, code spans holding ```, unmatched backticks, real/nested/unclosed
|
|
32
|
+
fences.
|
|
9
33
|
- Consumer action: none — refresh to latest.
|
|
10
34
|
|
|
11
35
|
## 0.8.4
|
package/dist/document.cjs
CHANGED
|
@@ -4897,7 +4897,8 @@ var import_micromark_extension_gfm = require("micromark-extension-gfm");
|
|
|
4897
4897
|
var import_html_escape3 = require("@ai-matrx/kit/html-escape");
|
|
4898
4898
|
function removeThinkingContent(content) {
|
|
4899
4899
|
if (!content) return "";
|
|
4900
|
-
|
|
4900
|
+
const hide = (_match, before, after) => before.length >= 2 || after.length >= 2 ? "\n\n" : "\n";
|
|
4901
|
+
let result = content.replace(/(\n*)<thinking>[\s\S]*?<\/thinking>(\n*)/gi, hide).replace(/(\n*)<think>[\s\S]*?<\/think>(\n*)/gi, hide).replace(/(\n*)<reasoning>[\s\S]*?<\/reasoning>(\n*)/gi, hide);
|
|
4901
4902
|
result = result.replace(/\n{3,}/g, "\n\n");
|
|
4902
4903
|
return result.trim();
|
|
4903
4904
|
}
|