diff options
author | David Martschenko <62178322+davidmrt98@users.noreply.github.com> | 2021-01-05 19:15:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 10:15:59 -0800 |
commit | 385b6a3b215124fd2dfa044b8847d69a6cf14a73 (patch) | |
tree | 26621521c0a59afc8fb4ce1fa7a837fdfa549af4 /test | |
parent | ea479bf28a4031f408af12ea92d3e19f9a838820 (diff) | |
download | pandoc-385b6a3b215124fd2dfa044b8847d69a6cf14a73.tar.gz |
Implement defaults file inheritance (#6924)
Allow defaults files to inherit options from other defaults files by
specifying them with the following syntax:
`defaults: [list of defaults files or single defaults file]`.
Diffstat (limited to 'test')
-rw-r--r-- | test/command/defaults-inheritance-1.md | 6 | ||||
-rw-r--r-- | test/command/defaults-inheritance-2.md | 5 | ||||
-rw-r--r-- | test/command/defaults-inheritance-3.md | 6 | ||||
-rw-r--r-- | test/command/defaults3.yaml | 4 | ||||
-rw-r--r-- | test/command/defaults4.yaml | 3 | ||||
-rw-r--r-- | test/command/defaults5.yaml | 2 | ||||
-rw-r--r-- | test/command/defaults6.yaml | 2 | ||||
-rw-r--r-- | test/command/defaults7.yaml | 2 | ||||
-rw-r--r-- | test/command/defaults8.yaml | 2 | ||||
-rw-r--r-- | test/command/defaults9.yaml | 1 |
10 files changed, 33 insertions, 0 deletions
diff --git a/test/command/defaults-inheritance-1.md b/test/command/defaults-inheritance-1.md new file mode 100644 index 000000000..0760e2ec0 --- /dev/null +++ b/test/command/defaults-inheritance-1.md @@ -0,0 +1,6 @@ +``` +% pandoc -d command/defaults3 +# Header +^D +# Header +``` diff --git a/test/command/defaults-inheritance-2.md b/test/command/defaults-inheritance-2.md new file mode 100644 index 000000000..8b26a2613 --- /dev/null +++ b/test/command/defaults-inheritance-2.md @@ -0,0 +1,5 @@ +``` +% pandoc -d command/defaults6 +^D +Error: Circular defaults file reference in 'command/defaults7.yaml' +``` diff --git a/test/command/defaults-inheritance-3.md b/test/command/defaults-inheritance-3.md new file mode 100644 index 000000000..81cac7baa --- /dev/null +++ b/test/command/defaults-inheritance-3.md @@ -0,0 +1,6 @@ +``` +% pandoc -d command/defaults8 +<h1>Header</h1> +^D +# Header +``` diff --git a/test/command/defaults3.yaml b/test/command/defaults3.yaml new file mode 100644 index 000000000..d8b6f9144 --- /dev/null +++ b/test/command/defaults3.yaml @@ -0,0 +1,4 @@ +defaults: + - command/defaults4 + - command/defaults5 +to: markdown diff --git a/test/command/defaults4.yaml b/test/command/defaults4.yaml new file mode 100644 index 000000000..a6caa985b --- /dev/null +++ b/test/command/defaults4.yaml @@ -0,0 +1,3 @@ +from: html +defaults: + - command/defaults5 diff --git a/test/command/defaults5.yaml b/test/command/defaults5.yaml new file mode 100644 index 000000000..bb48b9708 --- /dev/null +++ b/test/command/defaults5.yaml @@ -0,0 +1,2 @@ +from: markdown +to: html diff --git a/test/command/defaults6.yaml b/test/command/defaults6.yaml new file mode 100644 index 000000000..ac4a819e5 --- /dev/null +++ b/test/command/defaults6.yaml @@ -0,0 +1,2 @@ +defaults: + - command/defaults7 diff --git a/test/command/defaults7.yaml b/test/command/defaults7.yaml new file mode 100644 index 000000000..19ca8f09e --- /dev/null +++ b/test/command/defaults7.yaml @@ -0,0 +1,2 @@ +defaults: + - command/defaults6 diff --git a/test/command/defaults8.yaml b/test/command/defaults8.yaml new file mode 100644 index 000000000..e418d33b2 --- /dev/null +++ b/test/command/defaults8.yaml @@ -0,0 +1,2 @@ +from: html +defaults: command/defaults9 diff --git a/test/command/defaults9.yaml b/test/command/defaults9.yaml new file mode 100644 index 000000000..d732eb066 --- /dev/null +++ b/test/command/defaults9.yaml @@ -0,0 +1 @@ +to: markdown |