Skip to content

Commit 3afa05f

Browse files
Gareth Aneurin TribelloGareth Aneurin Tribello
authored andcommitted
Added option to not use github markdown in processMarkdown
1 parent 4eff308 commit 3afa05f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55

66
[project]
77
name = "PlumedToHTML"
8-
version = "0.102"
8+
version = "0.103"
99
description = "A package for creating prettified HTML for PLUMED files"
1010
authors = [{ name = "Gareth Tribello", email = "[email protected]" }]
1111
maintainers = [{ name = "Daniele Rapetti", email = "[email protected]" }]

src/PlumedToHTML/PlumedToHTML.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def processMarkdown( filename, plumedexe, plumed_names, actions, jsondir="./" )
551551
ninputs, nfail = processMarkdownString( inp, filename, plumedexe, plumed_names, actions, dirname, ofile, jsondir )
552552
return ninputs, nfail
553553

554-
def processMarkdownString( inp, filename, plumedexe, plumed_names, actions, dirname, ofile, jsondir="./" ) :
554+
def processMarkdownString( inp, filename, plumedexe, plumed_names, actions, dirname, ofile, jsondir="./", ghmarkdown=True ) :
555555
"""
556556
Process a string of markdown that contains LUMED input files using PlumedtoHTML
557557
@@ -639,7 +639,8 @@ def processMarkdownString( inp, filename, plumedexe, plumed_names, actions, dirn
639639
usejson=(not success[-1]),
640640
actions=actions )
641641
# Print the html for the solution
642-
ofile.write( "{% raw %}\n" + html + "\n {% endraw %} \n" )
642+
if ghmarkdown : ofile.write( "{% raw %}\n" + html + "\n {% endraw %} \n" )
643+
else : ofile.write( html )
643644
# This finds us the solution file
644645
elif inplumed and "#SOLUTIONFILE=" in line :
645646
solutionfile=line.strip().replace("#SOLUTIONFILE=","")

0 commit comments

Comments
 (0)