I am new to programming with Confluence. I am using Python 3 and the Confluence API to create Confluence pages.
The one thing that I cannot figure out is if I can add a multiline string to a Confluence page via the API?
It seems to strip all my carriage return line feeds and sticks everything on one line.
Example: (Python)
#Declare my multiline string
myString = '''a
b
c'''
When I use this call:
# Creating page in confluence
create_page_result = confluence.update_or_create(
parent_id=9999999,
title= 'My Test Page',
body=myString
It writes this string to the new Confluence page all on one line:
a b c
Is there any way around this?
Help!!!
Thanks,
Lou
You probably need to use the inline newline escape sequence, "\n". Check out the following page for more details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.