diff options
author | Magnus Hagander | 2022-06-25 20:50:29 +0000 |
---|---|---|
committer | Magnus Hagander | 2022-06-25 20:50:29 +0000 |
commit | f8ab5eb758f6deb0da28cdfc4b59ea787eaa471d (patch) | |
tree | 437f9825cade7874c8005b445ebb60163978b16d /postgresqleu/util/markup.py | |
parent | f7d4fea0646f564a7dde1444402a22401255fa33 (diff) |
Remove dependency on django_markwhat and showdown
This simplifies deployments since django_markwhat has a tendency to
create conflicting requirements that makes upgrades harder. Showdown
doesn't have that problem, but this way we have a single defined
markdown process instead of having two subtly different ones.
Most of the code behind this adapted from the pgweb project that went
through this some months ago.
Fixes #72
Diffstat (limited to 'postgresqleu/util/markup.py')
-rw-r--r-- | postgresqleu/util/markup.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/postgresqleu/util/markup.py b/postgresqleu/util/markup.py new file mode 100644 index 00000000..ab6012a1 --- /dev/null +++ b/postgresqleu/util/markup.py @@ -0,0 +1,7 @@ +import markdown + + +# We do pure markdown and don't bother doing any filtering on the content +# as for now anybody entering markdown is considered trusted. +def pgmarkdown(value): + return markdown.markdown(value, extensions=['tables', ]) |