Skip to content

Commit

Permalink
ABF: fix header text generation
Browse files Browse the repository at this point in the history
resolves #135
  • Loading branch information
swharden committed Aug 2, 2023
1 parent 20d5807 commit b19b2f6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/pyabf/tools/abfHeaderDisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ def showText(self):
def getText(self):
"""Return information about all objects as markdown-formatted text."""
text = ""
for item in self.things:
name, value = item
if value == "~SECTION~":
text += "\n### %s ###\n" % name
for name, value in self.things:
if value is None:
text += "%s" % (name)+"\n"
elif not isinstance(value, str):
text += "%s = %s\n" % (name, value)
elif value == "~SECTION~":
text += "\n %s \n" % name
elif value == "~DOCS~":
text += "\n~~~ %s ~~~\n" % name
elif str(name) == "~CODE~":
Expand Down

0 comments on commit b19b2f6

Please sign in to comment.