@@ -53,6 +53,11 @@ first two steps, everything else is up to you.
5353 will know what to expect. You may also want to update the URLs
5454 in the links above to match your repository.
5555
56+ 4 . [ ] (optional) ** Choose default test output formats** . Replace
57+ the ` FORMAT=native ` line in Makefile with your desired default
58+ output formats for tests, e.g. ` FORMAT=html latex ` . These must
59+ be possible values of Pandoc's ` --to ` option.
60+
56614 . [ ] (optional) ** Setup Quarto extension** : This step is
5762 recommended if you want to make it easy for [ Quarto] [ ] users to
5863 install and use your filter: Quarto expects the filter to be
@@ -82,21 +87,36 @@ targets while keeping the general structure.
8287Use the Makefile with ` make ... ` , where ` ... ` denotes one of the
8388targets listed in this section.
8489
85- #### ` test `
90+ #### ` generate `
91+
92+ (Re)generate test output files. This target runs your filter on the
93+ file ` test/input.md ` and generates one or more output files
94+ ` test/expected.<FORMAT> ` (` native ` by default).
95+
96+ Change desired output formats by replacing the Makefile's ` FORMAT=... `
97+ line with e.g. ` FORMAT=html docx ` . These must be possible values of
98+ Pandoc's ` --to ` option.
99+
100+ You can also set ` FORMAT ` on the command line to regenerate files in
101+ specific output formats:
86102
87- Tests the filter. This target runs your filter on file
88- ` test/input.md ` and compares the result with
89- ` test/expected.native ` . The latter file is also a valid make
90- target; invoke it to regenerate the expected output.
103+ ``` bash
104+ make regenerate FORMAT=docx
105+ ```
106+
107+ Files are generated using the Pandoc default options given in
108+ ` test/test.yaml ` . This file is provided by default but you may want
109+ to check it into source control and modify it as needed.
110+
111+ #### ` test `
91112
92- You may want to modify this target if your filter is intended for
93- a specific output format. E.g., if the filter only works for HTML
94- output, you may choose to replace ` test/expected.native ` with
95- ` test/expected.html ` , and to compare that file instead .
113+ Tests the filter. This target runs your filter on the file
114+ ` test/input.md ` using Pandoc options ` test/test.yaml ` and compares
115+ the result with one or more ` test/expected.<FORMAT> ` files
116+ ( ` native ` by default) .
96117
97- The test configs are kept in file ` test/test.yaml ` . The file is
98- generated on demand, but you may want to check it into source
99- control and modify it as needed.
118+ See the ` regenerate ` target on how to change default ` FORMAT ` values
119+ or passing it on the command lines.
100120
101121#### ` quarto-extension `
102122
0 commit comments