From 385b6a3b215124fd2dfa044b8847d69a6cf14a73 Mon Sep 17 00:00:00 2001 From: David Martschenko <62178322+davidmrt98@users.noreply.github.com> Date: Tue, 5 Jan 2021 19:15:59 +0100 Subject: 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]`. --- test/command/defaults-inheritance-1.md | 6 ++++++ test/command/defaults-inheritance-2.md | 5 +++++ test/command/defaults-inheritance-3.md | 6 ++++++ test/command/defaults3.yaml | 4 ++++ test/command/defaults4.yaml | 3 +++ test/command/defaults5.yaml | 2 ++ test/command/defaults6.yaml | 2 ++ test/command/defaults7.yaml | 2 ++ test/command/defaults8.yaml | 2 ++ test/command/defaults9.yaml | 1 + 10 files changed, 33 insertions(+) create mode 100644 test/command/defaults-inheritance-1.md create mode 100644 test/command/defaults-inheritance-2.md create mode 100644 test/command/defaults-inheritance-3.md create mode 100644 test/command/defaults3.yaml create mode 100644 test/command/defaults4.yaml create mode 100644 test/command/defaults5.yaml create mode 100644 test/command/defaults6.yaml create mode 100644 test/command/defaults7.yaml create mode 100644 test/command/defaults8.yaml create mode 100644 test/command/defaults9.yaml (limited to 'test/command') 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 +