Modify

Opened 5 years ago

#6848 new defect

RegEx aren't handeled well

Reported by: dimitri.slavutsky@… Owned by: richard
Priority: normal Component: TracTicketValidatorPlugin
Severity: normal Keywords: RegEx, re.py
Cc: Trac Release: 0.11

Description

Hi! I'm having issue to define a proper regex to handle my description field with this plugin.

The Description field should look like this:


== GOALS ==
Some Goals could be written here.
They could have some enumerations:

  1. Number one
  2. Number two

...

  1. Number N


<end of goals>

Here could be some more text


after this block could be another block, or just empty.

I defined an Reges and configured the plugin:

[components]
ticketvalidator.* = enabled

[ticketvalidator]
validates = description
description.rule = ^== '''GOALS''' ==[\n\r]*[.\r\n\s]*<end of goals>[\n\r]*[.\r\n]*
description.tip = Sections: Goals, Nesessary input, Nesessary output and Nesessary ressourses have to exist.

If I am testing without any text in between the "Goals-Tags" it seems to be alright, as soon, as I am adding some text, I am getting my own tip: Sections: Goals, Nesessary input, Nesessary output and Nesessary ressourses have to exist. I tried to debug it and it seems, that re.py troughs Enxpected EOF Expression.

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

Action
as new The owner will remain richard.
Author


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

 
Note: See TracTickets for help on using tickets.