-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix delimiting within <choose>
and <layout>
for CSL
#269
Conversation
Fixes typst#180 A design trade-off: The delimiter stack uses `String` instead of `&str`. Using `&str` could eliminate many cloning, but at the cost of introducing complex lifetimes. Considering that delimiters are typically short, I choose `String`.
Resolves typst#15 Relates-to: typst/hayagriva#269
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
You are welcome! And I notice that you updated the doc comments for push/pop (7a341cc).
The world might be a bit confusing. In XML, the term_child_ only includes the direct ones. (The term for both direct and indirect ones is descendant.) |
It is correct in the sense that it only passes the delimiter forward to children, which may decide to pass it further down the tree or not - usually not, as the point of delimiter is to delimit only the immediate children of a group or layout, unless the child of the So I guess it's more a matter of how you interpret it - it's true that the delimiter may affect descendants other than children with nested Either way, we could adopt a wording closer to the spec to be sure. |
Resolves #15 Relates-to: typst/hayagriva#269
Fix delimiting within
<choose>
and<layout>
for CSLFixes The
delimiter
attribute of<group>
is not applied to items inside<choose>
#180Fixes Issue with CSL Rendering (OSCOLA no ibid Style) #109
Frank Mittelbach and others, The Latex Companion (2nd ednAddison-Wesley Professional 2004).
Frank Mittelbach and others, The Latex Companion (2nd edn, Addison-Wesley Professional 2004).
2nd edn
.Add a minimal test case
Title_Edition_PublisherPlace_TitleEditionPublisherPlace
Title_Edition_Publisher_Place_TitleEditionPublisherPlace
_
between the first Publisher Place.There is a design trade-off:
The delimiter stack uses
String
instead of&str
.Using
&str
could eliminate many cloning, but at the cost of introducing complex lifetimes.Considering that delimiters are typically short, I choose
String
.Besides, I bump some
*.cbor
to pass tests. If this is not desired, I can reset the commit.