diff --git a/SSJ.py b/SSJ.py index 9a1f70f..d0cea65 100644 --- a/SSJ.py +++ b/SSJ.py @@ -139,7 +139,10 @@ def markdownSearch(regex, indChars, tag, line): newLine = line match = re.search(regex,newLine) while match != None: - newLine = newLine[:match.span()[0]] + "<" + tag + ">" + newLine[match.span()[0]+indChars:match.span()[1]-indChars] + "" + newLine[match.span()[1]:] + if (tag == "hr"): + newLine = newLine[:match.span()[0]] + "<" + tag + ">"+ newLine[match.span()[1]:] + else: + newLine = newLine[:match.span()[0]] + "<" + tag + ">" + newLine[match.span()[0]+indChars:match.span()[1]-indChars] + "" + newLine[match.span()[1]:] match = re.search(regex,newLine) return newLine @@ -154,6 +157,7 @@ def convertMarkdown(line): #code newLine = SSJ.markdownSearch("\`\`\`[^*]+\`\`\`", 3, "code", newLine) newLine = SSJ.markdownSearch("\`[^*]+\`", 1, "code", newLine) - + #hr + newLine = SSJ.markdownSearch("\-\-\-[^*]", 3, "hr", newLine) return newLine \ No newline at end of file