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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! XML/text primitives shared by every DOCX walker.
use QName;
/// True when `name` matches `expected`, ignoring any XML namespace prefix
/// (e.g. matches `w:p` against `b"p"` and a bare `p` against `b"p"`).
pub
/// Append `piece` to `target`, trimming whitespace and inserting a single
/// space separator when both sides are non-empty. Used to stitch the run
/// fragments inside a paragraph back into a single string.
pub
/// Append text that came from an entity reference.
///
/// [`push_text`] space-joins successive pieces, which is right when each piece
/// is a whole element's text. An entity reference splits one element into
/// several events, so joining there inserts a space in the middle of a word:
/// `AT&T` becomes `AT & T`. Entity text is appended exactly as-is instead.
// Currently unreferenced: entity events are handled inline by the extractors,
// but this documents the AT&T-splitting gotcha and is kept as the reference
// implementation ported from the reference engine.
pub
/// Collapse runs of whitespace (including newlines/tabs) into single spaces
/// and trim the result. Mirrors the previous per-file implementations.
pub