Skip to content

Commit

Permalink
Fixed a bug that is caused if you include files that don't finish wit…
Browse files Browse the repository at this point in the history
…h a newline character
  • Loading branch information
Gareth Aneurin Tribello authored and Gareth Aneurin Tribello committed Feb 27, 2024
1 parent 4f6146f commit de33636
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion PlumedToHTML/PlumedToHTML.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ def resolve_includes( srcdir, inpt, foundfiles ) :
final_inpt += "# " + clines+ "# ensures PLUMED loads the contents of the file called " + filename + "\n"
final_inpt += "# The contents of this file are shown below (click the red comment to hide them).\n"
foundfiles, parsed_inpt = resolve_includes( srcdir, include_contents, foundfiles )
final_inpt += parsed_inpt + "#ENDEXPANSION " + filename + "\n"
if parsed_inpt.endswith("\n") : final_inpt += parsed_inpt + "#ENDEXPANSION " + filename + "\n"
else : final_inpt += parsed_inpt + "\n#ENDEXPANSION " + filename + "\n"
else : final_inpt += clines
return foundfiles, final_inpt

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setuptools.setup(
name='PlumedToHTML',
version='0.53',
version='0.54',
author="Gareth Tribello",
author_email="[email protected]",
description="A package for creating pretified HTML for PLUMED files",
Expand Down

0 comments on commit de33636

Please sign in to comment.