Skip to content

Commit 9d2850e

Browse files
authored
Merge pull request #861 from jayemar/jayemar/toggle-hiding-of-wiki-links
Hide wiki markup as part of markdown-toggle-markup-hiding
2 parents d2d960b + f464a6f commit 9d2850e

File tree

5 files changed

+264
-156
lines changed

5 files changed

+264
-156
lines changed

Diff for: CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111

1212
* Bug fixes:
1313
- `markdown-export` should not output stderr content to output file
14+
- Hide wikilink markup as part of `markdown-toggle-markup-hiding` [GH-847][]
1415

1516
* Improvements:
1617
- Support drag and drop features on Windows and multiple files' drag and drop
1718
- Added cmark and cmark-gfm to the markdown command list.
1819
- Disable `imenu-submenus-on-top` by default [GH-882][]
1920

21+
[gh-847]: https://github.com/jrblevin/markdown-mode/issues/847
2022
[gh-882]: https://github.com/jrblevin/markdown-mode/issues/882
2123
[gh-891]: https://github.com/jrblevin/markdown-mode/issues/891
2224

Diff for: README.md

+27-15
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ using `package.el`. First, configure `package.el` and the MELPA Stable
6161
repository by adding the following to your `.emacs`, `init.el`,
6262
or equivalent startup file:
6363

64-
```lisp
64+
```emacs-lisp
6565
(require 'package)
6666
(add-to-list 'package-archives
6767
'("melpa-stable" . "https://stable.melpa.org/packages/"))
@@ -79,7 +79,7 @@ then you can automatically install and configure `markdown-mode` by
7979
adding a declaration such as this one to your init file (as an
8080
example; adjust settings as desired):
8181

82-
```lisp
82+
```emacs-lisp
8383
(use-package markdown-mode
8484
:ensure t
8585
:mode ("README\\.md\\'" . gfm-mode)
@@ -99,7 +99,7 @@ save the file where Emacs can find it (i.e., a directory in your
9999
`load-path`). You can then configure `markdown-mode` and `gfm-mode`
100100
to load automatically by adding the following to your init file:
101101

102-
```lisp
102+
```emacs-lisp
103103
(autoload 'markdown-mode "markdown-mode"
104104
"Major mode for editing Markdown files" t)
105105
(add-to-list 'auto-mode-alist
@@ -133,7 +133,7 @@ repository as above or install markdown-mode from
133133
If you clone the repository directly, then make sure that Emacs can
134134
find it by adding the following line to your startup file:
135135

136-
```lisp
136+
```emacs-lisp
137137
(add-to-list 'load-path "/path/to/markdown-mode/repository")
138138
```
139139

@@ -350,7 +350,7 @@ prefix. The most commonly used commands are described below.
350350
preview window to appear at the bottom or right, you can
351351
customize `markdown-split-window-direction`.
352352

353-
```lisp
353+
```emacs-lisp
354354
;; Set custom markdown preview function
355355
(setq markdown-live-preview-window-function #'my-markdown-preview-function)
356356
@@ -952,18 +952,17 @@ customization screen.
952952
953953
[Marked 2]: https://itunes.apple.com/us/app/marked-2/id890031187?mt=12&uo=4&at=11l5Vs&ct=mm
954954
955-
## Extensions
956-
955+
## Wiki Links Customization
957956
Besides supporting the basic Markdown syntax, Markdown Mode also
958957
includes syntax highlighting for `[[Wiki Links]]`. This can be
959958
enabled by setting `markdown-enable-wiki-links` to a non-nil value.
960-
Wiki links may be followed by pressing <kbd>C-c C-o</kbd> when the point
961-
is at a wiki link. Use <kbd>M-p</kbd> and <kbd>M-n</kbd> to quickly jump to the
962-
previous and next links (including links of other types).
959+
963960
Aliased or piped wiki links of the form `[[link text|PageName]]`
964-
are also supported. Since some wikis reverse these components, set
961+
are supported. Since some wikis reverse these components, set
965962
`markdown-wiki-link-alias-first` to nil to treat them as
966-
`[[PageName|link text]]`. If `markdown-wiki-link-fontify-missing`
963+
`[[PageName|link text]]`.
964+
965+
If `markdown-wiki-link-fontify-missing`
967966
is also non-nil, Markdown Mode will highlight wiki links with
968967
missing target file in a different color. By default, Markdown
969968
Mode only searches for target files in the current directory.
@@ -974,18 +973,31 @@ This value type is a symbol list. Possible values are
974973
- `parent-directories` : search in parent directories
975974
- `project` : search under project root
976975
977-
[SmartyPants][] support is possible by customizing `markdown-command`.
976+
## Extensions
977+
### SmartyPants
978+
979+
[SmartyPants][] is a free tool for easily translating plain ASCII punctuation
980+
characters into "smart" typographic punctuation HTML entities. It can perform
981+
the following transformations:
982+
- straight quotes ( " and ' ) into “curly” quote HTML entities
983+
- backticks-style quotes (``like this'') into “curly” quote HTML entities
984+
- dashes (“--” and “---”) into en- and em-dash entities
985+
- three consecutive dots (“...”) into an ellipsis entity
986+
987+
SmartyPants support is possible by customizing `markdown-command`.
978988
If you install `SmartyPants.pl` at, say, `/usr/local/bin/smartypants`,
979989
then you can set `markdown-command` to `"markdown | smartypants"`.
980990
You can do this either by using <kbd>M-x customize-group markdown</kbd>
981991
or by placing the following in your `.emacs` file:
982992
983-
```lisp
993+
```emacs-lisp
984994
(setq markdown-command "markdown | smartypants")
985995
```
986996

987997
[SmartyPants]: http://daringfireball.net/projects/smartypants/
988998

999+
### LaTeX Mathematical Expressions
1000+
9891001
Syntax highlighting for mathematical expressions written
9901002
in LaTeX (only expressions denoted by `$..$`, `$$..$$`, or `\[..\]`)
9911003
can be enabled by setting `markdown-enable-math` to a non-nil value,
@@ -1068,7 +1080,7 @@ by `markdown-mode` and `gfm-mode` as described below.
10681080
for line wrapping in buffers. You can do this with a
10691081
`gfm-mode-hook` as follows:
10701082

1071-
```lisp
1083+
```emacs-lisp
10721084
;; Use visual-line-mode in gfm-mode
10731085
(defun my-gfm-mode-hook ()
10741086
(visual-line-mode 1))

0 commit comments

Comments
 (0)