summaryrefslogtreecommitdiff
path: root/pandoc
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-09-28 16:51:05 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2022-11-10 10:48:59 +0100
commit3381cd924d28e29abf318235e8827e4f71997b25 (patch)
tree62122790c17ef5559a3bbe4ed014ed538935430e /pandoc
parentfe008d9a8e24e043de00cecc2754908f57d0a00e (diff)
downloadrules-typesetting-3381cd924d28e29abf318235e8827e4f71997b25.tar.gz
pandoc: Add data field to standalone
Diffstat (limited to 'pandoc')
-rw-r--r--pandoc/RULES39
1 files changed, 36 insertions, 3 deletions
diff --git a/pandoc/RULES b/pandoc/RULES
index 7ce5433..4a869c9 100644
--- a/pandoc/RULES
+++ b/pandoc/RULES
@@ -150,13 +150,14 @@
}
, "standalone":
{ "doc": ["Create a standalone document from the given inputs"]
- , "target_fields": ["srcs", "template"]
+ , "target_fields": ["srcs", "template", "data"]
, "string_fields": ["out", "meta data"]
, "field_doc":
{ "srcs":
[ "The files to build the document from, in order."
, "Honors the order within a [\"files\", \"ordered\"] target."
]
+ , "data": ["Additional files needed for building (e.g., images)"]
, "out":
["The name of the output file.", "Must not conflict with input files."]
, "template": ["The template definition to use"]
@@ -211,12 +212,37 @@
, "$1": {"type": "var", "name": "srcs"}
}
]
- , [ "data"
+ , [ "extra"
, { "type": "disjoint_map_union"
, "msg": "Data files may not conflict"
, "$1":
{ "type": "foreach"
, "var": "x"
+ , "range": {"type": "FIELD", "name": "data"}
+ , "body":
+ { "type": "map_union"
+ , "$1":
+ [ {"type": "DEP_RUNFILES", "dep": {"type": "var", "name": "x"}}
+ , { "type": "DEP_ARTIFACTS"
+ , "dep": {"type": "var", "name": "x"}
+ }
+ ]
+ }
+ }
+ }
+ ]
+ , [ "extra"
+ , { "type": "to_subdir"
+ , "subdir": "data"
+ , "$1": {"type": "var", "name": "extra"}
+ }
+ ]
+ , [ "data"
+ , { "type": "disjoint_map_union"
+ , "msg": "Template files may not conflict"
+ , "$1":
+ { "type": "foreach"
+ , "var": "x"
, "range": {"type": "FIELD", "name": "template"}
, "body":
{ "type": "map_union"
@@ -233,7 +259,14 @@
, [ "data"
, { "type": "to_subdir"
, "subdir": "data"
- , "$1": {"type": "var", "name": "data"}
+ , "$1":
+ { "type": "disjoint_map_union"
+ , "msg": "Template may not contain a \"data\" directory"
+ , "$1":
+ [ {"type": "var", "name": "data"}
+ , {"type": "var", "name": "extra"}
+ ]
+ }
}
]
, [ "lua filters"