@@ 304,8 304,9 @@ t = flip StyleTree []
type Context = M.HashMap Text [([Integer], Int)]
inheritCounters :: Context -> Context -> Context
-inheritCounters counterSource valueSource = M.intersectionWith cb valueSource counterSource -- indexed by name & el-path
- where cb val source = [counter | counter@(path, _) <- val, path `elem` [p | (p, _) <- source]]
+inheritCounters counterSource valueSource = M.unionWith cb valueSource counterSource -- indexed by name & el-path
+ where cb val source = [counter | counter@(path, _) <- val,
+ path `elem` [p | (p, _) <- source]]
instantiateCounter :: Context -> Path -> Text -> Int -> Context
instantiateCounter counters path name val = M.insertWith appendCounter name [(path, val)] counters