diff --git a/uml.py b/uml.py index 4a52235..7d238c5 100644 --- a/uml.py +++ b/uml.py @@ -140,8 +140,12 @@ def main(): for i in finput(): i = i.rstrip() - # ignore blank lines - if len(i) == 0: continue + # ignore blank lines (but not seperating paragraphs) + if len(i) == 0 and not flags["IN_PREFORMATTED"]: + if flags["PARA_PREV"]: + print("hi") + flags["PARA_PREV"] = False + continue # lines with text if i[0].isalpha() and not flags["IN_PREFORMATTED"]: @@ -185,7 +189,11 @@ def main(): elif command == "*": chain.append(Element("l", params)) elif command == "-": chain.append(Element("l", params)) elif command == ">": chain.append(Element("q", params)) - elif command == "=": chain.append(Element("r", params)) + elif command == "=": + splitted = params.split(' ') + url = splitted[0] + desc = ' '.join(splitted[1:]) + chain.append(Element("r", url, desc)) elif command == "|": if flags["TABLE_PREV"]: chain[-1].data.addrow(params)