Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newline at end of .plist and .glif files #40

Merged
merged 1 commit into from
Jun 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion normalization/data/glif/format1.glif
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
<string>arbitrary custom data!</string>
</dict>
</lib>
</glyph>
</glyph>
2 changes: 1 addition & 1 deletion normalization/data/glif/format2.glif
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
<note>
arbitrary text about the glyph
</note>
</glyph>
</glyph>
4 changes: 2 additions & 2 deletions normalization/test_ufonormalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@ def test_normalizeFontInfoPlist_guidelines_zero_is_not_None(self):

def _test_glifFormat(self):
glifFormat = {}
glifFormat[1] = GLIFFORMAT1.strip().replace(" ", "\t")
glifFormat[1] = GLIFFORMAT1.replace(" ", "\t")

glifFormat[2] = GLIFFORMAT2.strip().replace(" ", "\t")
glifFormat[2] = GLIFFORMAT2.replace(" ", "\t")
return glifFormat

def test_normalizeGLIF_formats_1_and_2(self):
Expand Down
4 changes: 3 additions & 1 deletion normalization/ufonormalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- things that need to be improved are marked with "# TO DO"
"""

__version__ = "0a1"
__version__ = "0a2"
description = """
UFO Normalizer (version %s):

Expand Down Expand Up @@ -528,6 +528,7 @@ def normalizePropertyList(data, preprocessor=None):
writer.beginElement("plist", attrs=dict(version="1.0"))
writer.propertyListObject(data)
writer.endElement("plist")
writer.raw("")
return writer.getText()

# GLIF
Expand Down Expand Up @@ -596,6 +597,7 @@ def normalizeGLIFString(text, glifPath=None, imageFileRef=[]):
if note is not None:
_normalizeGlifNote(note, writer)
writer.endElement("glyph")
writer.raw("")
return writer.getText()

def normalizeGLIF(ufoPath, *subpath):
Expand Down