No text hashtags

This commit is contained in:
Laurenz 2023-01-30 23:08:43 +01:00
parent 0ef1b02ee0
commit e1f2acff62
2 changed files with 3 additions and 2 deletions

View File

@ -181,7 +181,7 @@ impl Lexer<'_> {
'*' if !self.in_word() => SyntaxKind::Star,
'_' if !self.in_word() => SyntaxKind::Underscore,
'#' if self.s.at(|c: char| !c.is_whitespace()) => SyntaxKind::Hashtag,
'#' => SyntaxKind::Hashtag,
'[' => SyntaxKind::LeftBracket,
']' => SyntaxKind::RightBracket,
'\'' => SyntaxKind::SmartQuote,
@ -401,7 +401,7 @@ impl Lexer<'_> {
'|' if self.s.eat_if(']') => SyntaxKind::Shorthand,
'|' if self.s.eat_if('|') => SyntaxKind::Shorthand,
'#' if self.s.at(|c: char| !c.is_whitespace()) => SyntaxKind::Hashtag,
'#' => SyntaxKind::Hashtag,
'_' => SyntaxKind::Underscore,
'$' => SyntaxKind::Dollar,
'/' => SyntaxKind::Slash,

View File

@ -485,6 +485,7 @@ fn embedded_code_expr(p: &mut Parser) {
p.stop_at_newline(true);
p.enter(LexMode::Code);
p.assert(SyntaxKind::Hashtag);
p.unskip();
let stmt = matches!(
p.current(),