Modify

Opened 4 years ago

Closed 4 years ago

Last modified 2 years ago

#8329 closed defect (fixed)

Does not work in windows

Reported by: swordfish Owned by: adamansky
Priority: normal Component: LinenoMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

\n will be \r\n in windows, so this macro not work fine.

  • LinenoMacro.py

     
    1111
    1212__all__ = ['LinenoMacro', 'LinenoAnnotator']
    1313
    14 SB_RB = re.compile(r"^#{1}!\w+\n", re.M)
     14SB_RB = re.compile(r"(^#{1}!\w+(\n){1,})|(^#{1}!\w+(\r\n){1,})", re.M)
    1515
    1616class LinenoMacro(Component):
    1717    """Prints line numbered code listings"""

Attachments (1)

win32.patch (362 bytes) - added by swordfish 4 years ago.
A patch for work in windows

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by swordfish

A patch for work in windows

comment:1 Changed 4 years ago by swordfish

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 2 years ago by anonymous

  • Summary changed from Not work in windwos. to Does not work in windows

comment:3 Changed 2 years ago by rjollos

(In [11940])

Fixes #3680, #8329:

  • Use regular expression from trac 0.11's trac.wiki.parser to match the processor type. This should fix incompatibility problems on Windows.
  • Organized imports.
  • Deleted empty 0.9 directory.

Add Comment

Modify Ticket

Action
as closed The owner will remain adamansky.
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.