Skip to content

Commit de33636

Browse files
Gareth Aneurin TribelloGareth Aneurin Tribello
Gareth Aneurin Tribello
authored and
Gareth Aneurin Tribello
committed
Fixed a bug that is caused if you include files that don't finish with a newline character
1 parent 4f6146f commit de33636

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

PlumedToHTML/PlumedToHTML.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ def resolve_includes( srcdir, inpt, foundfiles ) :
260260
final_inpt += "# " + clines+ "# ensures PLUMED loads the contents of the file called " + filename + "\n"
261261
final_inpt += "# The contents of this file are shown below (click the red comment to hide them).\n"
262262
foundfiles, parsed_inpt = resolve_includes( srcdir, include_contents, foundfiles )
263-
final_inpt += parsed_inpt + "#ENDEXPANSION " + filename + "\n"
263+
if parsed_inpt.endswith("\n") : final_inpt += parsed_inpt + "#ENDEXPANSION " + filename + "\n"
264+
else : final_inpt += parsed_inpt + "\n#ENDEXPANSION " + filename + "\n"
264265
else : final_inpt += clines
265266
return foundfiles, final_inpt
266267

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setuptools.setup(
88
name='PlumedToHTML',
9-
version='0.53',
9+
version='0.54',
1010
author="Gareth Tribello",
1111
author_email="gareth.tribello@gmail.com",
1212
description="A package for creating pretified HTML for PLUMED files",

0 commit comments

Comments
 (0)