Modify

Opened 14 years ago

Closed 13 years ago

#6712 closed defect (duplicate)

Section edit for numbered headlines

Reported by: andras.lipoth@… Owned by: Catalin BALAN
Priority: normal Component: SectionEditPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

Section edit does not work with numbered sections (NumberedHeadlinesPlugin) due to different headline format (### instead of ===). The fix is trivial, see below:

diff --git a/0.11/tracsectionedit/web_ui.py b/0.11/tracsectionedit/web_ui.py
index c93b410..1cd7131 100644
--- a/0.11/tracsectionedit/web_ui.py
+++ b/0.11/tracsectionedit/web_ui.py
@@ -98,6 +98,8 @@ class WikiSectionEditModule(Component):
                 is_code_block = False
             if is_code_block == False and re.match(r'^\s*(={1,5}) .+ \1(?:\s*#.
                 count = count + 1
+            if is_code_block == False and re.match(r'^\s*(#{1,5}) .+ \1(?:\s*#.
+                count = count + 1
             if count < int(section):
                 pre.append(line)
             elif count == int(section):

Attachments (0)

Change History (1)

comment:1 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)
Resolution: duplicate
Status: newclosed

Fixed in #5460.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Catalin BALAN.
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.