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:
parent
f6418a1d50
commit
ab07f03911
|
@ -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
|
||||
|
|
Reference in New Issue