2007-10-08 Don Allingham <don@gramps-project.org>

* src/gen/lib/note.py: make independent of MarkupText.py



svn: r9106
This commit is contained in:
Don Allingham 2007-10-08 19:45:06 +00:00
parent e5fb6a7c40
commit c8d45e8b89
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,6 @@
2007-10-08 Don Allingham <don@gramps-project.org>
* src/gen/lib/note.py: make independent of MarkupText.py
2007-10-08 Alex Roitman <shura@gramps-project.org>
* src/GrampsCfg.py (get_researcher): Remove old usage.
* src/gen/db/dbdir.py (__close_metadata): Store tuple;

View File

@ -41,9 +41,10 @@ from types import InstanceType
#-------------------------------------------------------------------------
from primaryobj import BasicPrimaryObject
from notetype import NoteType
from MarkupText import ROOT_START_TAG, LEN_ROOT_START_TAG
from markertype import MarkerType
ROOT_START_TAG = '<gramps>'
#-------------------------------------------------------------------------
#
# Class for notes used throughout the majority of GRAMPS objects
@ -119,7 +120,7 @@ class Note(BasicPrimaryObject):
"""
text = self.text
if not markup and text[0:LEN_ROOT_START_TAG] == ROOT_START_TAG:
if not markup and text.starts_with(ROOT_START_TAG):
text = self.delete_tags(text)
return text