Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publishToConfluence removes all linebreaks from code #1253

Closed
tkleiber opened this issue Sep 14, 2023 · 11 comments · Fixed by #1306
Closed

publishToConfluence removes all linebreaks from code #1253

tkleiber opened this issue Sep 14, 2023 · 11 comments · Fixed by #1306
Assignees

Comments

@tkleiber
Copy link

Describe the bug
When I have multiline code snippets, publishToConfluence removes all linebreaks from code, the html file does have have all of it.

To Reproduce
Steps to reproduce the behavior:

  1. Create a file with embedded or include code with at least 2 lines, for example
* Update Jenkins Version
** Anmeldung als root
** Stoppen/Update/Starten Jenkins
+
[source,bash]
----
systemctl stop jenkins
zypper update jenkins
systemctl start jenkins
----
  1. Run publishToConfluence

Expected behavior
Confluence should show all lines of code separately instead of 1 concatenated line.

Screenshots
generated html file:
image
exported to confluence:
image

Configuration

  • docToolchain version: 3.0.2
  • OS: Linux SLES 15 SP 4
  • Browser: Edge, Chrome
  • Relevant SDK Versions: Temurin jdk-17.0.6+10
@PacoVK
Copy link
Collaborator

PacoVK commented Oct 27, 2023

Thanks for reporting this. Unfortunately I cannot reproduce it. Are you on Confluence Cloud or server? If Server which version do you run?

@tkleiber
Copy link
Author

Confluence Server 8.22.6

@PacoVK
Copy link
Collaborator

PacoVK commented Oct 31, 2023

@tkleiber are you sure, i can only find Jira Software releases that match this version. https://confluence.atlassian.com/display/DOC/Confluence+8.6+Release+Notes

@tkleiber
Copy link
Author

Sorry, my fault. This was the JIRA version.
Confluence is 7.19.12.
Will be updated in the next days to 7.19.16

@PacoVK
Copy link
Collaborator

PacoVK commented Nov 15, 2023

@tkleiber did you upgrade your confluence meanwhile, and does the issue still persist?

@tkleiber
Copy link
Author

Tested both on Confluence Version 7.19.16 (Server) and 8.5.3 (Data Center).

Issue is reproducible on docToolchain 3.0.2 and 3.1.2.
Issue is not reproducible on docToolchain 2.1.0.

@PacoVK
Copy link
Collaborator

PacoVK commented Nov 17, 2023

Thanks I keep trying to investigate, although it's hard without access to a Server instance. But actually you provided good hints 👍

@stehlih
Copy link
Contributor

stehlih commented Nov 22, 2023

We have the same problem on our on-premise Confluence server 8.6.1

We are using doctoolchain 3.1.2.

If subpagesForSections = 1 all source code blocks are published with the right line breaks.

After switch to subpagesForSections = 2 all source code blocks are now OneLiner (all line breaks are removed),

Going back to subpagesForSections = 1 restores the line breaks (and we must delete all the ghost subpages).

@tkleiber
Copy link
Author

tkleiber commented Nov 22, 2023

We need subpagesForSections = 2. Maybe the issue is related to the changes for my issue #402?

@PacoVK
Copy link
Collaborator

PacoVK commented Nov 24, 2023

Awesome thanks the last hint was the missing part and I could now reproduce and locate the error in rewriteCodeBlocks. However the bug seems not to be trivial (after first investigations) and I need some time to come up with a fix...

@PacoVK PacoVK self-assigned this Nov 25, 2023
@PacoVK
Copy link
Collaborator

PacoVK commented Nov 25, 2023

Here we go, thanks to your input @tkleiber and @stehlih i could finally find the issue, reproduce and resolve it.
Will be fixed as soon as #1306 gets live :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants