witten
/
luminotes
Archived
1
0
Fork 0

Fixing broken regular expression which was greedily eating nearly entire

contents of notes. Unit tests for this is really necessary.
This commit is contained in:
Dan Helfman 2007-08-21 05:53:56 +00:00
parent f6418a1d50
commit ab07f03911
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ from Tags import Html, Head, Title, Style, Meta, Body, H1, Div, Span, Hr, A
class Html_file( Html ):
NOTE_LINK_PATTERN = re.compile( u'<a\s+href="\/notebooks\/.+[?&]note_id=([a-z0-9]*)"[^>]*>', re.IGNORECASE )
NOTE_LINK_PATTERN = re.compile( u'<a\s+href="\/notebooks\/[^>]+[?&]note_id=([a-z0-9]*)"[^>]*>', re.IGNORECASE )
def __init__( self, notebook_name, notes ):
relinked_notes = {} # map from note id to relinked note contents