Modify

Opened 15 years ago

Closed 15 years ago

#6837 closed defect (worksforme)

HTML Paragraph tags misordered/

Reported by: LoicVigilan Owned by: Martin Scharrer
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 15 years ago.

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by LoicVigilan

Attachment: sandbox.jpg added

comment:1 Changed 15 years ago by Martin Scharrer

Status: newassigned

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 15 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 15 years ago by Martin Scharrer

Resolution: worksforme
Status: assignedclosed

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>

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Martin Scharrer.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.