-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow list arguments in default files to accumulate #5881
Comments
This changes `applyFilters` from Text.Pandoc.Filter so that it does a left fold rather than a right fold, applying the filters in the order listed. [behavior change] The command-line arguments are accumulated in order instead of reverse order. A first step twoards #5881.
This may also help with #3139 |
What is the difference between Update, I see the documentation at: Lines 1421 to 1591 in 9c7f75a
|
Previously optIncludeInHeader, etc. were in reverse order. This has been changed to promote #5881. Note also that the `sourcefile` variable used to be sometimes a string, sometimes a list (when there was more than one). Now it is always a list.
In the past when I have dealt with problems analogous to this one I have found that trying to apply a single a rule to all fields of a common basic type (e.g. lists) is generally prone to lead to confusing boundary conditions. Some list fields might be suitable handling through a list append, as you have shown, some by pre-pending, some by full replacement, and some by a case-by-case basis depending on values of other fields. It is a complex subject that is tempting to try to treat generically, though doing so is not always viable. |
Closed by ec043e0 |
For example, if defaults1.yaml is
and defaults2.yaml is
and the command line is
then we should get four files included, in the order: D.txt, A.txt, B.txt, C.txt.
This affects many of the arguments in defaults files. Note that some of these are currently accumulated in reverse in option processing (when multiple options are allowed), and we may want to regularize this a bit.
We also need some tests for this sort of thing.
The text was updated successfully, but these errors were encountered: