-
Notifications
You must be signed in to change notification settings - Fork 11
/
tree_postprocess.clj
32 lines (24 loc) · 945 Bytes
/
tree_postprocess.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(ns stencil.tree-postprocess
"Postprocessing an xml tree"
(:require [stencil.postprocess.table :refer :all]
[stencil.postprocess.whitespaces :refer :all]
[stencil.postprocess.ignored-tag :refer :all]
[stencil.postprocess.images :refer :all]
[stencil.postprocess.list-ref :refer :all]
[stencil.postprocess.fragments :refer :all]
[stencil.postprocess.html :refer :all]))
;; calls postprocess
(def postprocess
(comp
;; must be called last. replaces the Ignored attrubute values from ids to namespaces.
#'unmap-ignored-attr
;; hides rows/columns where markers are present
#'fix-tables
;; fixes xml:space attribute values where missing
#'fix-whitespaces
;; includes html() call results.
#'fix-html-chunks
#'fix-list-dirty-refs
#'replace-images
;; call this first. includes fragments and evaluates them too.
#'unpack-fragments))