mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Fix lexer behavior on non-whitespace before ref (#4553)
This commit is contained in:
parent
98d98a4bfd
commit
4d8976b619
@ -474,7 +474,7 @@ impl Lexer<'_> {
|
||||
Some('-') if !s.at(['-', '?']) => {}
|
||||
Some('.') if !s.at("..") => {}
|
||||
Some('h') if !s.at("ttp://") && !s.at("ttps://") => {}
|
||||
Some('@') if !s.at(is_id_start) => {}
|
||||
Some('@') if !s.at(is_valid_in_label_literal) => {}
|
||||
_ => break,
|
||||
}
|
||||
|
||||
|
@ -54,3 +54,8 @@ $ A = 1 $ <eq2>
|
||||
// Error: 1-7 label occurs in the document and its bibliography
|
||||
@arrgh
|
||||
#bibliography("/assets/bib/works.bib")
|
||||
|
||||
--- issue-4536-non-whitespace-before-ref ---
|
||||
// Test reference with non-whitespace before it.
|
||||
#figure[] <1>
|
||||
#test([(#ref(<1>))], [(@1)])
|
||||
|
Loading…
x
Reference in New Issue
Block a user