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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//! Character escapes occur in the [string][] and [text][] content types.
//!
//! ## Grammar
//!
//! Character escapes form with the following BNF
//! (<small>see [construct][crate::construct] for character groups</small>):
//!
//! ```bnf
//! character_escape ::= '\\' ascii_punctuation
//! ```
//!
//! Like much of markdown, there are no “invalid” character escapes: just a
//! slash, or a slash followed by anything other than an ASCII punctuation
//! character, is just a slash.
//!
//! To escape other characters, use a [character reference][character_reference]
//! instead (as in, `&`, `{`, or say `	`).
//!
//! It is also possible to escape a line ending in text with a similar
//! construct: a [hard break (escape)][hard_break_escape] is a backslash followed
//! by a line ending (that is part of the construct instead of ending it).
//!
//! ## Recommendation
//!
//! If possible, use a character escape.
//! Otherwise, use a character reference.
//!
//! ## Tokens
//!
//! * [`CharacterEscape`][Name::CharacterEscape]
//! * [`CharacterEscapeMarker`][Name::CharacterEscapeMarker]
//! * [`CharacterEscapeValue`][Name::CharacterEscapeValue]
//!
//! ## References
//!
//! * [`character-escape.js` in `micromark`](https://github.com/micromark/micromark/blob/main/packages/micromark-core-commonmark/dev/lib/character-escape.js)
//! * [*§ 2.4 Backslash escapes* in `CommonMark`](https://spec.commonmark.org/0.31/#backslash-escapes)
//!
//! [string]: crate::construct::string
//! [text]: crate::construct::text
//! [character_reference]: crate::construct::character_reference
//! [hard_break_escape]: crate::construct::hard_break_escape
use crateName;
use crate;
use crateTokenizer;
/// Start of character escape.
///
/// ```markdown
/// > | a\*b
/// ^
/// ```
/// After `\`, at punctuation.
///
/// ```markdown
/// > | a\*b
/// ^
/// ```