Bug 807525 - Have embedjs.py append newlines when not present. (r=till)

This commit is contained in:
Shu-yu Guo 2012-11-01 23:40:38 -07:00
Родитель 6b1639d999
Коммит f70dbc0250
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -17,7 +17,7 @@ def replaceErrorMsgs(source_files, messages_file, output_file):
if len(source_files) == 0:
return
for line in fileinput.input(source_files):
output.write(replaceMessages(line, messages))
output.write(replaceMessages(line if line[-1] == '\n' else line + '\n', messages))
def buildMessagesTable(messages_file):
table = {}
@ -48,4 +48,4 @@ def main():
js2c.JS2C([combined_file, macros_file], [output_file], { 'TYPE': 'CORE', 'COMPRESSION': 'off', 'DEBUG':debug })
if __name__ == "__main__":
main()
main()