-
Notifications
You must be signed in to change notification settings - Fork 433
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
Newline at end of text line in contents property is not included when appended to wiki file #988
Comments
I will have to look into that, but wonder if it is 'feature' of how multi-line parameters are parsed |
I did another test... If there's 2 lines containing text, the newline at the end of the first line is copied. The trailing spaces and newlines after the last line of text are clipped. So "Line 2" does end up on another line. But the next time it's executed, "Line 1" is appended to the end of the previous "Line 2". Here's the raw markdown and preview of the results after 2 executions: |
I think that supports my assumption there is some trimming of the text in a multiline YAML. I think the best option is to add a new parameter to the task to optionally insert a new line between appended/prepended files. |
I guess there’s a few use cases out there that might warrant prepending a newline before the content, and/or appending a newline after the content. Something for you to think about, but I think one or the other would resolve the issue I’ve encountered. |
The updated task is being released as 1.24.3. There is now an extra parameter
|
Thanks! I just tested the new feature and all is good. |
Describe the bug
I'm using the WIKIUpdater to append content to an existing wiki page. The content is specified in the contents property (instead of reading from a file).
The newline at the end of a text line in the contents property is not included when it's appended to the wiki page content.
Thus, a newline is not included on the last line of the appended content in the wiki page. So when this task is executed a couple of times, it will end up appending the content to the end of the last line instead of the next line since the last line will not have a newline .
Here's a screenshot of the YAML (displaying CTRL characters to show the CR LFs). This example has a newline at the end of the desired text line to append, plus a newline on the next line (for good measure, but is expected to be excluded since the literal style with clip should maintain a single newline at the end of the string).
However, the newline is not added to the wiki page content.
Here's a screenshot of the wiki page content (and preview) after executing the task 3 times:
Expected behavior
Expecting the newline at the end of the content line to be copied to the wiki page content.
Where is the issue seen:
The text was updated successfully, but these errors were encountered: