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

new-blocklevel-tags doesn't work with XML para tag #63

Closed
Pajamaman opened this issue Aug 16, 2012 · 3 comments
Closed

new-blocklevel-tags doesn't work with XML para tag #63

Pajamaman opened this issue Aug 16, 2012 · 3 comments

Comments

@Pajamaman
Copy link

This issue is not specific to this version of HTML Tidy, i.e. it was in previous versions as well. Seems like this is a good place to address it however.

Config:
indent: yes
indent-spaces: 4
input-xml: yes
output-xml: yes
new-blocklevel-tags: para
wrap: 0

XML:


<?xml version="1.0" encoding="utf-8"?>
<document>
<topic>
<para>
<b>Name:</b>Torgo.
</para>
</topic>
</document>

Converts to:


<?xml version="1.0" encoding="utf-8"?>
<document>
    <topic>
        <para>
        <b>Name:</b>Torgo.</para>
    </topic>
</document>

Should be:


<?xml version="1.0" encoding="utf-8"?>
<document>
    <topic>
        <para>
            <b>Name:</b>Torgo.
        </para>
    </topic>
</document>
@geoffmcl
Copy link
Contributor

As you may know the latest development branch is develop-500
$ git checkout develop-500
We hope you get a chance to check it out ;=))

But using your xml sample and config I can confirm this 'feature' is still in tidy code today ;=((

So technically this should be labelled a feature request, but for now will leave it as a bug, and see what can be done about it... should not be so hard to push the closing para to a new line...

@geoffmcl
Copy link
Contributor

geoffmcl commented Feb 2, 2015

Sorry, I tried and I tried, but pushing the para to a new line proved very, VERY difficult.

It has nothing to do with the new-blocklevel-tags option.

With or without this option tidy will not indent the text more, and will append the closing tag on the same line as the text, what ever the tag is.

Given that Tidy has been like this probably since the beginning, this is a feature request, and can only push it out to an indefinite future.

@geoffmcl
Copy link
Contributor

@Pajamaman, given that this has been a 'feature' of tidy for a long LONG time, I am not inclined to continue the search to change this behavior.

Please note it is no longer necessary to checkout the develop-500 branch. All the latest is in the default master branch as we head towards a 5.0.0 release...

I'll close this for now, but feel free to re-open, or open new issues... Thanks for reporting...

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

No branches or pull requests

3 participants