From 821ec1e4d5f5e64ed54972960589ca5c8c41b9f9 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 2 Jul 2026 00:08:33 -0400 Subject: feat(markdown): start the preview server from F2 when it's down cj/markdown-preview now brings up the simple-httpd listener itself instead of signaling a user-error pointing at cj/markdown-preview-server-start. The two-command flow guarded against a surprise network listener, but the preview is the only reason the listener exists, so the guard was just an extra step. I kept the start command for manual use. --- tests/test-markdown-config.el | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'tests/test-markdown-config.el') diff --git a/tests/test-markdown-config.el b/tests/test-markdown-config.el index e079a8b4..ed3543bb 100644 --- a/tests/test-markdown-config.el +++ b/tests/test-markdown-config.el @@ -18,6 +18,14 @@ (require 'org) (require 'markdown-config) +;; simple-httpd (elpa) is absent under `make test'; stand in for it so +;; the preview path's (require 'simple-httpd) stays a no-op. Tests mock +;; httpd-running-p explicitly, so the stub bodies never matter. +(unless (featurep 'simple-httpd) + (defun httpd-running-p () nil) + (defun httpd-start () nil) + (provide 'simple-httpd)) + (ert-deftest test-markdown-config-registers-markdown-org-src-lang () "Normal: `markdown' shows up in `org-src-lang-modes' mapped to `markdown' so org-lint stops warning on `#+begin_src markdown' and @@ -70,14 +78,28 @@ plain HTTP." (should (string-match-p "