Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

wordpress xml file import skips new line characters in code blocks

  • #7348
    Avatar photo[anonymous]

    I have posts in WordPress where code is written in between pre tags. When I import the XML file from wodpress the new line characters in the code block are not maintained and all lines appear in a one single line.

    for example, in WordPress:

    line01
    line02
    line03

    will appear as below in publii:

    line01 line02 line03

    I have used the text editor while writing all the posts, so I write everything using pure HTML and do not use block editor or any other editor.

    #7350
    Avatar photo[anonymous]

    The WordPress site which I am trying to import is : https://thegeeksearch.com

    #7351
    Avatar photo[anonymous]

    After some digging, I have found the issue: https://stackoverflow.com/questions/35504890/how-to-add-a-newline-line-break-in-xml-file

    So you need to convert new line characters to Line feed ( ) in XML file that is generated by WordPress export. But don’t know how to do it on so many posts.

    Do let me know if any of you know any plugin or any other easy workaround for adding line feed in the pre blocks.