Modify

Opened 5 years ago

Closed 4 years ago

#6837 closed defect (worksforme)

HTML Paragraph tags misordered/

Reported by: LoicVigilan Owned by: 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 (1)

sandbox.jpg (33.8 KB) - added by LoicVigilan 5 years ago.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by LoicVigilan

comment:1 Changed 5 years ago 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.

comment:2 Changed 5 years ago 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.

comment:3 Changed 4 years ago by martin_s

  • Resolution set to worksforme
  • Status changed from assigned to closed

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 Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.