summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emacs/markdown-mode/files')
-rw-r--r--app-emacs/markdown-mode/files/markdown-mode-2.5-markdown-command.patch (renamed from app-emacs/markdown-mode/files/markdown-mode-2.4-markdown-command.patch)11
-rw-r--r--app-emacs/markdown-mode/files/markdown-mode-2.5-test.patch30
-rw-r--r--app-emacs/markdown-mode/files/markdown-mode-2.6-remove-failing-tests.patch91
3 files changed, 126 insertions, 6 deletions
diff --git a/app-emacs/markdown-mode/files/markdown-mode-2.4-markdown-command.patch b/app-emacs/markdown-mode/files/markdown-mode-2.5-markdown-command.patch
index 1ae481d6c094..99ed3d2149b7 100644
--- a/app-emacs/markdown-mode/files/markdown-mode-2.4-markdown-command.patch
+++ b/app-emacs/markdown-mode/files/markdown-mode-2.5-markdown-command.patch
@@ -1,13 +1,12 @@
-dev-python/markdown2 and dev-python/markdown install their commands
-as markdown2 and markdown_py, respectively.
+dev-python/markdown2 installs its command as markdown2
---- markdown-mode-2.4-orig/markdown-mode.el
-+++ markdown-mode-2.4/markdown-mode.el
-@@ -90,7 +90,7 @@
+--- markdown-mode-2.5/markdown-mode.el
++++ markdown-mode-2.5/markdown-mode.el
+@@ -94,7 +94,7 @@
:group 'text
:link '(url-link "https://jblevins.org/projects/markdown-mode/"))
--(defcustom markdown-command (let ((command (cl-loop for cmd in '("markdown" "pandoc")
+-(defcustom markdown-command (let ((command (cl-loop for cmd in '("markdown" "pandoc" "markdown_py")
+(defcustom markdown-command (let ((command (cl-loop for cmd in '("markdown" "pandoc" "markdown2" "markdown_py")
when (executable-find cmd)
return (file-name-nondirectory it))))
diff --git a/app-emacs/markdown-mode/files/markdown-mode-2.5-test.patch b/app-emacs/markdown-mode/files/markdown-mode-2.5-test.patch
new file mode 100644
index 000000000000..0bd1e8b7f667
--- /dev/null
+++ b/app-emacs/markdown-mode/files/markdown-mode-2.5-test.patch
@@ -0,0 +1,30 @@
+This test seems to expect interactive input, therefore disable.
+
+--- markdown-mode-2.5/tests/markdown-test.el
++++ markdown-mode-2.5/tests/markdown-test.el
+@@ -6643,25 +6643,6 @@
+ (should (string= (markdown-wiki-link-link) "Zettel Markdown")))
+ (kill-buffer)))))
+
+-(ert-deftest test-markdown-ext/wiki-link-search-under-project ()
+- "Test that searching link under project root."
+- (let ((markdown-enable-wiki-links t)
+- (markdown-link-space-sub-char " ")
+- (markdown-wiki-link-search-type '(project))
+- (expected (expand-file-name "wiki/pr590/Guide/Zettel Markdown/math.md"
+- markdown-test-dir)))
+- (progn
+- (find-file (expand-file-name "wiki/pr590/Guide/Plugin/Link.md" markdown-test-dir))
+- (unwind-protect
+- (progn
+- (markdown-mode)
+- (re-search-forward "math")
+- (goto-char (match-beginning 0))
+- (markdown-wiki-link-p) ;; create match-data
+- (let ((link (markdown-convert-wiki-link-to-filename (markdown-wiki-link-link))))
+- (should (string= (expand-file-name link) expected))))
+- (kill-buffer)))))
+-
+ (ert-deftest test-markdown-ext/wiki-link-major-mode ()
+ "Test major-mode of linked page."
+ (let ((markdown-enable-wiki-links t)
diff --git a/app-emacs/markdown-mode/files/markdown-mode-2.6-remove-failing-tests.patch b/app-emacs/markdown-mode/files/markdown-mode-2.6-remove-failing-tests.patch
new file mode 100644
index 000000000000..4d1396dcb12e
--- /dev/null
+++ b/app-emacs/markdown-mode/files/markdown-mode-2.6-remove-failing-tests.patch
@@ -0,0 +1,91 @@
+--- a/tests/markdown-test.el
++++ b/tests/markdown-test.el
+@@ -6756,46 +6756,6 @@ x|"
+ (markdown-indent-region (line-beginning-position) (line-end-position) nil)
+ (should (string-equal (buffer-string) " #. abc\n def\n"))))
+
+-(ert-deftest test-markdown-ext/wiki-link-rules ()
+- "Test wiki link search rules and font lock for missing pages."
+- (let ((markdown-enable-wiki-links t)
+- (markdown-wiki-link-fontify-missing t)
+- (markdown-wiki-link-search-type '(project)))
+- (progn
+- (find-file (expand-file-name "wiki/root" markdown-test-dir))
+- (unwind-protect
+- (progn
+- (markdown-mode)
+- ;; search rules
+- (should (string-match-p
+- "/sub/foo$"
+- (markdown-convert-wiki-link-to-filename "foo")))
+- (should (string-equal
+- (markdown-convert-wiki-link-to-filename "doesnotexist")
+- "doesnotexist"))
+- ;; font lock
+- (markdown-test-range-has-property 1 11 'font-lock-face 'markdown-link-face)
+- (markdown-test-range-has-property 14 33 'font-lock-face 'markdown-missing-link-face)
+- (markdown-test-range-has-property 36 42 'font-lock-face 'markdown-link-face)
+- (markdown-test-range-has-property 45 60 'font-lock-face 'markdown-missing-link-face))
+- (kill-buffer)))
+- (progn
+- (find-file (expand-file-name "wiki/sub/foo" markdown-test-dir))
+- (unwind-protect
+- (progn
+- (markdown-mode)
+- ;; search rules
+- (should (string-match-p
+- "/wiki/root$"
+- (markdown-convert-wiki-link-to-filename "root")))
+- (should (string-equal
+- (markdown-convert-wiki-link-to-filename "doesnotexist")
+- "doesnotexist"))
+- ;; font lock
+- (markdown-test-range-has-property 1 16 'font-lock-face 'markdown-missing-link-face)
+- (markdown-test-range-has-property 19 26 'font-lock-face 'markdown-link-face))
+- (kill-buffer)))))
+-
+ (ert-deftest test-markdown-ext/wiki-link-keep-match-data ()
+ "Test that markdown-wiki-link-p keeps expected match data.
+ Detail: https://github.com/jrblevin/markdown-mode/pull/590"
+@@ -7185,41 +7145,6 @@ foo(bar=None)
+ (cl-loop for ov in (overlays-in (car bounds) (cdr bounds))
+ thereis (overlay-get ov 'flyspell-overlay))))
+
+-(ert-deftest test-markdown-flyspell/check-word-p ()
+- "Test for `flyspell'."
+- (skip-unless (executable-find ispell-program-name))
+- (markdown-test-string "aaa
+-
+-```
+-bbb
+-```
+-
+-ccc
+-
+-`ddd`
+-
+-eee
+-
+-<!-- fff -->
+-
+-@ref9999
+-"
+- (flyspell-buffer)
+- (search-forward "aaa")
+- (should (markdown-test-flyspell-incorrect-word-p))
+- (search-forward "bbb") ;; in code block
+- (should-not (markdown-test-flyspell-incorrect-word-p))
+- (search-forward "ccc")
+- (should (markdown-test-flyspell-incorrect-word-p))
+- (search-forward "ddd") ;; in inline code
+- (should-not (markdown-test-flyspell-incorrect-word-p))
+- (search-forward "eee")
+- (should (markdown-test-flyspell-incorrect-word-p))
+- (search-forward "fff") ;; in comment
+- (should-not (markdown-test-flyspell-incorrect-word-p))
+- (search-forward "@ref") ;; pandoc reference
+- (should-not (markdown-test-flyspell-incorrect-word-p))))
+-
+ (ert-deftest test-markdown-flyspell/remove-overlay ()
+ "Test non-dictionary word in code block with `flyspell-mode'.
+ Details: https://github.com/jrblevin/markdown-mode/issues/311"