Skip to content

ParseGlyphConstructionListFromString chokes on a empty line followed by a comment #84

@benkiel

Description

@benkiel

Found that if you have a blank line followed by a a comment, the ParseGlyphConstructionListFromString function will have an empty string in the outputed list.

Test case:

>>> txt = """
... *narrownobreakspace = thinspace |202F
... 
... # Dead marks
... ?acute = acute ^ 500/2 + acute, 500/2 + acute |00B4
... """
>>> result = ParseGlyphConstructionListFromString(txt)
>>> print(result)
['*narrownobreakspace = thinspace |202F', '', 'acute = acute ^ 500/2 + acute, 500/2 + acute |00B4']

Remove the blank line and it works:

>>> txt = """
... *narrownobreakspace = thinspace |202F
... # Dead marks
... ?acute = acute ^ 500/2 + acute, 500/2 + acute |00B4
... """
>>> result = ParseGlyphConstructionListFromString(txt)
>>> print(result)
['*narrownobreakspace = thinspace |202F', 'acute = acute ^ 500/2 + acute, 500/2 + acute |00B4']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions