-
Notifications
You must be signed in to change notification settings - Fork 23
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
Don't treat <choose> as a grouping/rendering element #83
Comments
Thanks @bwiernik -- it's been awhile since I've looked at this so my apologies while I get up to speed! Is the issue here that the three text nodes are rendered without the delimiter? Specifically, this note in the spec isn't being followed when rendering the text nodes? |
Yes the issue is that the 3 nodes are being rendered without the delimiter |
Yes you're right, I added your example as a test case and it's definitely rendering without the delimiter at the moment. |
OK your example should be easy to fix, however, more generally, are ancestor delimiters computed based on the style structure only or based on the current rendering tree? For example if I omit the |
I guess, using the rendering tree (i.e., inherit delimiters from outside marcros) is potentially dangerous, because this way you'd always reach at least the |
OK I implemented it this way for now. Delimiters can't be inherited from outside a macro, so basically, the when a choose node produces output from more than one rendering element, they are joined using the delimiter of the closest group or layout element above it. If that's the way it's supposed to be we can close this and I'll push a new version of the Gem. |
That's correct, there is no need to propagate delimiters into a macro call. |
Thanks for looking into this so quickly! |
Great, thanks! I pushed version 2.1.0 to RubyGems. |
Noticed this behavior here: citation-style-language/styles#6500
For this structure:
The expected output is: Genre, Publisher, Place
The group attributes like delimiter should pass through
<choose>
and apply to the individual rendering elements inside, with the same behavior as if the elements were supplied directly without<choose>
.<choose>
should not create an implicit<group>
.I find that the current behavior not infrequently produces surprising output for the checks we run on the CSL style repository. Would it be possible to update citeproc-ruby's behavior here?
Thanks!
The text was updated successfully, but these errors were encountered: