Ghostwriter icon indicating copy to clipboard operation
Ghostwriter copied to clipboard

Missing space between cross-reference and following text.

Open smcgu opened this issue 1 year ago • 2 comments

Describe the bug

The space between a cross-reference and the following text is missing.

Input:

<p>{{.ref some-evidence}} shows the compromise.</p>

Output:

Figure 1shows the compromise.

To Reproduce

Steps to reproduce the behavior:

  1. Add cross-reference to text sentence/paragraph in finding
  2. Generate DOCX report

Expected Behavior

The space should be maintained and present.

Input:

<p>{{.ref some-evidence}} shows the compromise.</p>

Output:

Figure 1 shows the compromise.

Server Specs:

  • OS: Ubuntu
  • Docker: v27.1.2, build d01f264
  • Docker Compose: v2.29.1
  • Ghostwriter: v4.2.5 (but, this has been present for multiple versions)

smcgu avatar Aug 27 '24 20:08 smcgu

Hey @smcgu, I'm unable to reproduce this in most scenarios. This HTML produces this in Word.

<p>{{.Benny}}</p>
<p>This is a cross-ref for Benny {{.ref benny}} right here.</p>
image

The situation seems to be the space is only lost if you start a sentence with the cross-reference. We'll take a look and see why that happens.

chrismaddalena avatar Aug 27 '24 23:08 chrismaddalena

I should have included that in my earlier issue post but that aligns with my experience, too. It seems to only impact cross references at the start of a sentence.

I'll definitely update this issue if I see it elsewhere.

smcgu avatar Aug 27 '24 23:08 smcgu