diff --git a/.vscode/launch.json b/.vscode/launch.json index baa51a4e..9ad233f0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,6 +10,8 @@ "cwd": "${workspaceFolder}", "args": [ //"-nw", + "-ed", + "-emp", "-a", "ed:wark", "-v", diff --git a/copyparty/__main__.py b/copyparty/__main__.py index a69e060d..a0d7251d 100644 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -136,6 +136,7 @@ def main(): ap.add_argument("-v", metavar="VOL", type=str, action="append", help="add volume") ap.add_argument("-q", action="store_true", help="quiet") ap.add_argument("-ed", action="store_true", help="enable ?dots") + ap.add_argument("-emp", action="store_true", help="enable markdown plugins") ap.add_argument("-nw", action="store_true", help="disable writes (benchmark)") ap.add_argument("-nih", action="store_true", help="no info hostname") ap.add_argument("-nid", action="store_true", help="no info disk-usage") diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 9bd9e1e2..46fd96c8 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -963,6 +963,7 @@ class HttpCli(object): "edit": "edit" in self.uparam, "title": html_escape(self.vpath), "lastmod": int(ts_md * 1000), + "md_plug": "true" if self.args.emp else "false", "md": "", } sz_html = len(template.render(**targs).encode("utf-8")) diff --git a/copyparty/web/md.html b/copyparty/web/md.html index b9545cad..fced2989 100644 --- a/copyparty/web/md.html +++ b/copyparty/web/md.html @@ -123,8 +123,11 @@ write markdown (most html is 🙆 too)