diff --git a/flucoma/FluidRefData.py b/flucoma/FluidRefData.py index 648d767..f18dcde 100644 --- a/flucoma/FluidRefData.py +++ b/flucoma/FluidRefData.py @@ -545,7 +545,7 @@ def process_template(template_path,outputdir,client_data,host): template = env.get_template(host['template']) - with open(ofile,'w') as f: + with open(ofile,'w', newline='\n') as f: f.write(template.render(client_data)) # arguments=client_data['arguments'], # attributes=client_data['attributes'], @@ -585,7 +585,7 @@ def process_topic(topic_file,template_path,outputdir,host): else: raise NameError('{} not found'.format(topic_file)) - with open(ofile,'w') as f: + with open(ofile,'w', newline='\n') as f: f.write(template.render( title=topic_data['title'], digest=topic_data['digest'], diff --git a/flucoma/doc/render.py b/flucoma/doc/render.py index 4d04ab8..e3b5fde 100644 --- a/flucoma/doc/render.py +++ b/flucoma/doc/render.py @@ -77,7 +77,7 @@ def client(client, client_index, args, driver): client_data['messages'] = ContextView(client_data.pop('messages')) with add_context(client): - with open(ofile,'w',encoding='utf-8') as f: + with open(ofile,'w',encoding='utf-8', newline='\n') as f: f.write(template.render(client_data, index=client_index, driver = driver, @@ -98,7 +98,7 @@ def topic(topic_data,client_index,args,driver): template = env.get_template(driver['topic_template']) logging.info(f"{topic_data['name']}: Making {ofile}") - with open(ofile,'w',encoding='utf-8') as f: + with open(ofile,'w',encoding='utf-8', newline='\n') as f: f.write(template.render( title=topic_data['title'], digest=topic_data['digest'],