A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jrblevin/markdown-mode/commit/ae1085aee1a4458d4cbfa710fbb9a433aa42c105 below:

Treat a backslash escape as a markup character; resolves #377 · jrblevin/markdown-mode@ae1085a · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+32

-5

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+32

-5

lines changed Original file line number Diff line number Diff line change

@@ -5,9 +5,10 @@

5 5

* **Breaking changes:**

6 6

- GNU Emacs 26.1 or later is required.

7 7 8 -

* New Feature:

8 +

* New Features:

9 9

- Introduce `markdown-fontify-whole-heading-line` variable for highlighting

10 10

whole header line. [GH-705][]

11 +

- Backslashes in escape sequences are now treated as markup. [GH-377][]

11 12 12 13

* Improvements:

13 14

- `markdown` passes `buffer-file-name` as a parameter to

@@ -28,6 +29,7 @@

28 29

- Fix to mistake to handle the line as delimiter row[GH-747][]

29 30

- Fix wrong displaying horizontal rule in `markdown-view-mode` [GH-747][]

30 31 32 +

[gh-377]: https://github.com/jrblevin/markdown-mode/issues/377

31 33

[gh-572]: https://github.com/jrblevin/markdown-mode/issues/572

32 34

[gh-705]: https://github.com/jrblevin/markdown-mode/issues/705

33 35

[gh-716]: https://github.com/jrblevin/markdown-mode/issues/716

Original file line number Diff line number Diff line change

@@ -861,6 +861,10 @@ Group 3 matches the text.")

861 861

"[^ \n\t][ \t]*\\( \\)\n"

862 862

"Regular expression for matching line breaks.")

863 863 864 +

(defconst markdown-regex-escape

865 +

"\\(\\\\\\)."

866 +

"Regular expression for matching escape sequences.")

867 + 864 868

(defconst markdown-regex-wiki-link

865 869

"\\(?:^\\|[^\\]\\)\\(?1:\\(?2:\\[\\[\\)\\(?3:[^]|]+\\)\\(?:\\(?4:|\\)\\(?5:[^]]+\\)\\)?\\(?6:\\]\\]\\)\\)"

866 870

"Regular expression for matching wiki links.

@@ -2216,6 +2220,7 @@ Depending on your font, some reasonable choices are:

2216 2220

(4 'markdown-highlighting-face)

2217 2221

(5 markdown-markup-properties)))

2218 2222

(,markdown-regex-line-break . (1 'markdown-line-break-face prepend))

2223 +

(,markdown-regex-escape . ((1 markdown-markup-properties prepend)))

2219 2224

(markdown-fontify-sub-superscripts)

2220 2225

(markdown-match-inline-attributes . ((0 markdown-markup-properties prepend)))

2221 2226

(markdown-match-leanpub-sections . ((0 markdown-markup-properties)))

Original file line number Diff line number Diff line change

@@ -2225,6 +2225,16 @@ See GH-245."

2225 2225

(should (invisible-p 154))

2226 2226

(should (invisible-p 156)))))

2227 2227 2228 +

(ert-deftest test-markdown-markup-hiding/escape ()

2229 +

"Test hiding markup for backslash escapes."

2230 +

(markdown-test-string "\\#"

2231 +

(markdown-test-range-has-property (point) (point) 'invisible 'markdown-markup)

2232 +

(should-not (invisible-p (point)))

2233 +

(should-not (invisible-p (1+ (point))))

2234 +

(markdown-toggle-markup-hiding t)

2235 +

(should (invisible-p (point)))

2236 +

(should-not (invisible-p (1+ (point))))))

2237 + 2228 2238

;;; Markup hiding url tests:

2229 2239 2230 2240

(ert-deftest test-markdown-url-hiding/eldoc ()

@@ -2263,7 +2273,10 @@ Detail: https://github.com/jrblevin/markdown-mode/pull/674"

2263 2273

"Test that slash inside asterisks is not italic."

2264 2274

(markdown-test-string

2265 2275

"not italic *\\*"

2266 -

(markdown-test-range-has-face (point-min) (point-max) nil)))

2276 +

(markdown-test-range-has-face 1 12 nil)

2277 +

;; Check face of the backslash

2278 +

(markdown-test-range-has-face 13 13 'markdown-markup-face)

2279 +

(markdown-test-range-has-face 14 14 nil)))

2267 2280 2268 2281

(ert-deftest test-markdown-font-lock/italics-4 ()

2269 2282

"Test escaped asterisk inside italics."

@@ -2656,10 +2669,17 @@ Detail: https://github.com/jrblevin/markdown-mode/issues/743"

2656 2669

(markdown-test-range-has-face 461 467 'markdown-inline-code-face)

2657 2670

(markdown-test-range-has-face 468 468 'markdown-markup-face)

2658 2671

;; Escaping of leading backquotes

2659 -

(markdown-test-range-has-face 586 592 nil)

2660 -

(markdown-test-range-has-face 597 603 nil)

2672 +

(markdown-test-range-has-face 586 586 'markdown-markup-face)

2673 +

(markdown-test-range-has-face 587 590 nil)

2674 +

(markdown-test-range-has-face 591 591 'markdown-markup-face)

2675 +

(markdown-test-range-has-face 592 592 nil)

2676 +

(markdown-test-range-has-face 597 597 'markdown-markup-face)

2677 +

(markdown-test-range-has-face 598 601 nil)

2678 +

(markdown-test-range-has-face 602 602 'markdown-markup-face)

2679 +

(markdown-test-range-has-face 603 603 nil)

2661 2680

;; A code span crossing lines

2662 -

(markdown-test-range-has-face 652 656 nil)

2681 +

(markdown-test-range-has-face 652 652 'markdown-markup-face)

2682 +

(markdown-test-range-has-face 653 656 nil)

2663 2683

(markdown-test-range-has-face 657 657 'markdown-markup-face)

2664 2684

(markdown-test-range-has-face 658 665 'markdown-inline-code-face)

2665 2685

(markdown-test-range-has-face 666 666 'markdown-markup-face)

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4