diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-08-12 20:25:08 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-08-12 20:27:42 -0700 |
commit | be9957bddc1e1edac2375b6b945ab4d07f6198d2 (patch) | |
tree | 40f2075b87bd95f708542f420822946ffc741ac7 /test/command | |
parent | 0ab8670a0eb52b5da2bef64b2cc1917e4d5ddb54 (diff) | |
download | pandoc-be9957bddc1e1edac2375b6b945ab4d07f6198d2.tar.gz |
Escape MetaString values (as added with --metadata flag).
Previously they would be transmitted to the template without
any escaping.
Note that `--M title='*foo*'` yields a different result from
---
title: *foo*
---
In the latter case, we have emphasis; in the former case, just
a string with literal asterisks (which will be escaped
in formats, like Markdown, that require it).
Closes #3792.
Diffstat (limited to 'test/command')
-rw-r--r-- | test/command/3792.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/command/3792.md b/test/command/3792.md new file mode 100644 index 000000000..7c76afee7 --- /dev/null +++ b/test/command/3792.md @@ -0,0 +1,13 @@ +Make sure metadata values are treated as strings, +and properly escaped. + +``` +% pandoc -t markdown -s -M title="<this> *that*" +ok +^D +--- +title: '\<this\> \*that\*' +--- + +ok +``` |