~fabrixxm/activist

598ea5c62a03a3be6e20ff0dd179a1da79e06cdd — fabrixxm 13 days ago 947a50b
cli `article` massage markdown html output
1 files changed, 1 insertions(+), 0 deletions(-)

M activist/commands/cli.py
M activist/commands/cli.py => activist/commands/cli.py +1 -0
@@ 78,6 78,7 @@ def article(text:Optional[str] = "-", title:str = ""):
        text = sys.stdin.read()

    html = markdown.markdown(text, extensions=['codehilite'])
    html = html.replace("<p><code>", "<pre><code>").replace("</code></p>", "</code></pre>")
    source = {'content': text, 'mediaType': 'text/markdown'}
    obj_id = settings.BASEURL + "/pages/" + slugify.slugify(title)
    obj = db.Object.get(obj_id)