question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extra line before paragraph

See original GitHub issue

Thank you for a great module. I’m really looking forward to using it.

Using docx version 5.0.0-rc5 I’m getting an extra line prior to (or within) each paragraph. For example:

image

The above file was generated using the code below, which is a JS version of demo/1-basic.ts.

var fs = require('fs')
var docx = require('docx');

const doc = new docx.Document();

doc.addSection({
	children: [
		new docx.Paragraph({
			children: [
				new docx.TextRun("Hello World"),
				new docx.TextRun({
					text: "Foo Bar",
					bold: true
				}),
				new docx.TextRun({
					text: "Github is the best",
					bold: true
				})
			]
		})
	],
});

docx.Packer.toBuffer(doc).then((buffer) => {
	fs.writeFileSync("docx-simple.docx", buffer);
});

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jamesmontalvo3commented, Sep 3, 2019

Fixed by #391.

0reactions
dolanmiucommented, Mar 15, 2021

I think this is no longer an issue, I just tested this now and it doesn’t seem to happen anymore

Closing.

Can re-open if its still persistant.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Word 2016: Line and Paragraph Spacing - GCF Global
On the Home tab, click the Line and Paragraph Spacing command. Click Add Space Before Paragraph or Remove Space After Paragraph from the...
Read more >
How to add an empty line between paragraphs? - TeX
I have two sections which I'd like to separate by an empty line. Every time I press Enter , LyX removes that empty...
Read more >
Change the line spacing in Word - Microsoft Support
Select one or more paragraphs to update. Press Ctrl + A to select all. · Go to Home > Line and Paragraph Spacing...
Read more >
Line breaks and blank spaces - Overleaf, Online LaTeX Editor
The most standard way how to break lines is to create a new paragraph. This is done by leaving an empty line in...
Read more >
Eliminating "Before Spacing" at the Top of a Page
When you define the formatting for a paragraph (such as a heading), you can instruct Word to add additional space before the paragraph....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found