Ticket #6837 (closed defect: worksforme)

Opened 2 years ago

Last modified 2 years ago

HTML Paragraph tags misordered/

Reported by: LoicVigilan Assigned to: martin_s
Priority: normal Component: NumberedHeadlinesPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Hello,

Thank your for the great plugin. It helps me a lot.

It seems that there's a little problem when using the plugin in the way the HTML Paragraph tags are rendered. The following Wiki Syntax :

= The Sandbox =

This is just a page to practice and learn WikiFormatting. 

# The Sandbox #

This is just a page to practice and learn WikiFormatting.

gives the following HTML :

<h1 id="TheSandbox">The Sandbox</h1>
<p>
This is just a page to practice and learn WikiFormatting. 
</p>
<p>
<h1 id="TheSandbox1">1. The Sandbox</h1>
</p>
<p>
This is just a page to practice and learn WikiFormatting.
</p>

As you can see, when numbered, the h1 is included in an unnecessary paragraph. That will cause the h1 margins and paddings to be incorrect (see the attached sandbox.jpg).

I'm sorry I can't help in resolving the problem as I can'st speak python at all.

Can you confirm the problem is plugin related and not local to my installation ?

Attachments

sandbox.jpg (33.8 kB) - added by LoicVigilan on 03/21/10 19:42:02.

Change History

03/21/10 19:42:02 changed by LoicVigilan

  • attachment sandbox.jpg added.

03/21/10 22:25:18 changed by martin_s

  • status changed from new to assigned.

Thank you for reporting this. I can recreate the problem. However, it is not directly caused by the plugin, but by Trac itself. I now ([7790]) added some new code to tell the wiki formatter to close the current paragraph the same way the normal headline does it. However, the problem didn't disappeared.

Maybe opening a bug ticket for Trac ("Unwanted paragraph around IWikiSyntaxProvider content") could help. There is a similar one for wiki macros.

03/22/10 09:45:01 changed by LoicVigilan

Thank you for the quick answer.

Please don't believe I don't want to do the work of opening the bug ticket for Trac ("Unwanted paragraph around IWikiSyntaxProvider content") but I think you're really more qualified to do this. There's a good chance I even will not understand the Trac guys answers...

But tell me. If you don't, I will try to write the bug ticket.

05/24/10 22:41:00 changed by martin_s

  • status changed from assigned to closed.
  • resolution set to worksforme.

I now ([7997]) added an option (ON by default) to close the paragraph tag before the h-tag. A opening p-tag is added afterwards. This seems to be the only reasonable solution as long this isn't fixed in the Trac API itself (I didn't found time yet to create a bug ticket -- but I clearly remember to have discussed this issue with some Trac developer already, just can't find that ticket anymore).

However this solution creates an empty paragraph before and after the numbered headlines. :-(

<h1 id="TheSandbox">The Sandbox</h1>
<p>
This is just a page to practice and learn ...
</p>
<p></p>
<h1 id="TheSandbox1">1. The Sandbox</h1>
<p></p>
<p>
This is just a page to practice and learn ...
</p>

Add/Change #6837 (HTML Paragraph tags misordered/)




Change Properties
Action