aboutsummaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-11-19 09:05:19 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2021-11-19 09:05:19 -0800
commit4f2eac88aa1cd26d096a88450ad3ae929980e7a6 (patch)
tree9c47d929b1ca07431d932717df12f50429907fbf /test/command
parentdf5ae1c186ed625e25cf6f080ddf24549f7af22e (diff)
downloadpandoc-4f2eac88aa1cd26d096a88450ad3ae929980e7a6.tar.gz
MediaWiki writer: fix code for generating spans for header IDs.
We need to generate a span when the header's ID doesn't match the one MediaWiki would generate automatically. But MediaWiki's generation scheme is different from ours (it uses uppercase letters, and `_` instead of `-`, for example). This means that in going from markdown -> mediawiki, we'll now get spans before almost every heading, unless explicit identifiers are used that correspond to the ones MediaWiki auto-generates. This is uglier output but it's necessary for internal links to work properly. See #7697.
Diffstat (limited to 'test/command')
-rw-r--r--test/command/7697.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/command/7697.md b/test/command/7697.md
index 28e865c82..eb9c823d0 100644
--- a/test/command/7697.md
+++ b/test/command/7697.md
@@ -21,7 +21,7 @@ ref to top of this section: [[#refsubpage1|refsubpage1]].
```
```
% pandoc -f markdown -t mediawiki
-# Heading {#heading}
+# My Heading {#My_Heading}
^D
-= Heading =
+= My Heading =
```