mirror of
https://github.com/typst/typst
synced 2025-06-28 16:22:53 +08:00
Fix citation grouping bug with spaces
This commit is contained in:
parent
7bb4f6df44
commit
c177a63c9b
@ -755,6 +755,7 @@ impl<'a> CiteGroupBuilder<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let Some(citation) = content.to::<CiteElem>() {
|
if let Some(citation) = content.to::<CiteElem>() {
|
||||||
|
self.staged.retain(|(elem, _)| !elem.is::<SpaceElem>());
|
||||||
self.items.push(citation.clone(), styles);
|
self.items.push(citation.clone(), styles);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 151 KiB |
Binary file not shown.
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 115 KiB |
BIN
tests/ref/meta/cite-group.png
Normal file
BIN
tests/ref/meta/cite-group.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
@ -1,7 +1,16 @@
|
|||||||
#set page(width: 300pt)
|
#set page(width: 300pt)
|
||||||
|
|
||||||
@mcintosh_anxiety, @psychology25
|
@mcintosh_anxiety
|
||||||
@netwok, @issue201, @arrgh, @quark, @distress,
|
@psychology25
|
||||||
@glacier-melt, @issue201, @tolkien54, @sharing, @restful
|
@netwok
|
||||||
|
@issue201
|
||||||
|
@arrgh
|
||||||
|
@quark
|
||||||
|
@distress,
|
||||||
|
@glacier-melt
|
||||||
|
@issue201
|
||||||
|
@tolkien54
|
||||||
|
@sharing
|
||||||
|
@restful
|
||||||
|
|
||||||
#bibliography("/files/works.bib")
|
#bibliography("/files/works.bib")
|
||||||
|
19
tests/typ/meta/cite-group.typ
Normal file
19
tests/typ/meta/cite-group.typ
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// Test citation grouping.
|
||||||
|
|
||||||
|
---
|
||||||
|
A#[@netwok@arrgh]B \
|
||||||
|
A@netwok@arrgh B \
|
||||||
|
A@netwok @arrgh B \
|
||||||
|
A@netwok @arrgh. B \
|
||||||
|
|
||||||
|
A @netwok#[@arrgh]B \
|
||||||
|
A @netwok@arrgh, B \
|
||||||
|
A @netwok @arrgh, B \
|
||||||
|
A @netwok @arrgh. B \
|
||||||
|
|
||||||
|
A#[@netwok @arrgh @quark]B. \
|
||||||
|
A @netwok @arrgh @quark B. \
|
||||||
|
A @netwok @arrgh @quark, B.
|
||||||
|
|
||||||
|
#set text(0pt)
|
||||||
|
#bibliography("/files/works.bib")
|
Loading…
x
Reference in New Issue
Block a user