@json-to-office/core-docx 7.7.1 → 7.7.2
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/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin/example/index.js +19 -1
- package/dist/plugin/example/index.js.map +1 -1
- package/dist/renderers/docxjs/index.d.ts.map +1 -1
- package/dist/renderers/office-open/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5119,6 +5119,12 @@ function buildDocument(ir, resources = /* @__PURE__ */ new Map(), pageNumbers, e
|
|
|
5119
5119
|
updateFields: ir.settings.updateFields,
|
|
5120
5120
|
...ir.settings.trackRevisions ? { trackRevisions: true } : {}
|
|
5121
5121
|
},
|
|
5122
|
+
// A text's `\n` is a manual line break inside its paragraph, and Word
|
|
5123
|
+
// stretches the line before one across the whole width of a justified
|
|
5124
|
+
// paragraph — a two-word line spread edge to edge. `w:doNotExpandShiftReturn`
|
|
5125
|
+
// sets that line flush like the last line of a paragraph, the way every
|
|
5126
|
+
// reader expects. docx keeps compatibility mode 15 alongside it.
|
|
5127
|
+
compatibility: { doNotExpandShiftReturn: true },
|
|
5122
5128
|
...ir.numbering.length > 0 ? { numbering: { config: ir.numbering.map(numberingConfig) } } : {},
|
|
5123
5129
|
// word/footnotes.xml and word/endnotes.xml, keyed by the id their
|
|
5124
5130
|
// references carry.
|
|
@@ -6840,7 +6846,19 @@ async function buildDocumentOptions(ir, charts2 = [], svgRasterFallback) {
|
|
|
6840
6846
|
...coreProperties2(ir),
|
|
6841
6847
|
settings: {
|
|
6842
6848
|
updateFields: ir.settings.updateFields,
|
|
6843
|
-
...ir.settings.trackRevisions ? { trackRevisions: true } : {}
|
|
6849
|
+
...ir.settings.trackRevisions ? { trackRevisions: true } : {},
|
|
6850
|
+
// A text's `\n` is a manual line break inside its paragraph, and Word
|
|
6851
|
+
// stretches the line before one across the whole width of a justified
|
|
6852
|
+
// paragraph. `w:doNotExpandShiftReturn` sets that line flush instead.
|
|
6853
|
+
// Passing `compatibility` replaces @office-open/docx's fresh-document
|
|
6854
|
+
// defaults rather than extending them, so they are restated here.
|
|
6855
|
+
compatibility: {
|
|
6856
|
+
version: 15,
|
|
6857
|
+
overrideTableStyleFontSizeAndJustification: true,
|
|
6858
|
+
enableOpenTypeFeatures: true,
|
|
6859
|
+
doNotFlipMirrorIndents: true,
|
|
6860
|
+
doNotExpandShiftReturn: true
|
|
6861
|
+
}
|
|
6844
6862
|
},
|
|
6845
6863
|
...ir.numbering.length > 0 ? {
|
|
6846
6864
|
numbering: {
|