Modify

Opened 8 years ago

#6848 new defect

RegEx aren't handeled well

Reported by: dimitri.slavutsky@… Owned by: Richard Liao
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)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Richard Liao.

Add Comment


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

 
Note: See TracTickets for help on using tickets.