Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pretty printing Confluence HTML

Ken Poulton March 29, 2013

We often use the Command Line Interface to download a page, edit it in a Linux text editor and upload again. For some kinds of editing, that's just much easier.

The machine-generated HTML that comes out of Confluence 4 is remarkably editor unfriendly, with run-on lines and no indentation for lists or tables.

Does anyone have a pretty printer for Confluence HTML? The standard Linux program tidy(1) barfs on the <ac:> tags.

2 answers

1 vote
David at David Simpson Apps
Atlassian Partner
July 2, 2013

The storage format is XML based with a custom namespace.

Really, you need to

  1. get a hold of the schema
  2. wrap the content in a new root element with the namespacing specified
  3. parse in tidy with namespacing enabled
0 votes
Jimmi p
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 24, 2018

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events