From d86a5e8a1f469dd79abf3137dba77a71fae2a774 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 3 Feb 2021 21:30:36 +0100 Subject: =?UTF-8?q?Tidy=20up=20raw=20blocks=20=F0=9F=A7=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- src/parse/parser.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/parse/parser.rs') 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. -- cgit v1.2.3