diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-02-03 21:30:36 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-02-03 21:34:49 +0100 |
| commit | d86a5e8a1f469dd79abf3137dba77a71fae2a774 (patch) | |
| tree | fc7ab35d999322b9d124e41ab80948df23965d26 /src/parse/parser.rs | |
| parent | 6fcef9973be4253e5b377251dd9d1921f9738fc1 (diff) | |
Tidy up raw blocks 🧹
- Better trimming (only trim at the end if necessary)
- Fixed block-level layouting
- Improved pretty printing
- Flip inline variable to block
- Flip inline variable to display for math formulas
Diffstat (limited to 'src/parse/parser.rs')
| -rw-r--r-- | src/parse/parser.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parse/parser.rs b/src/parse/parser.rs index b7767772..986a36b0 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -243,6 +243,11 @@ impl<'s> Parser<'s> { ) } + /// Peek at the source of the next token. + pub fn peek_src(&self) -> &'s str { + self.get(self.peek_span()) + } + /// Checks whether the next token fulfills a condition. /// /// Returns `false` if there is no next token. |
