Skip to content
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

Improve whitespace consistency of output labels #4

Open
LandingEllipse opened this issue Apr 22, 2021 · 0 comments
Open

Improve whitespace consistency of output labels #4

LandingEllipse opened this issue Apr 22, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@LandingEllipse
Copy link
Contributor

Whitespace and indentation issues are observed here and there when using Passthrough. This issue is a place to collect reproducible snippets which can be investigated further.

Non-fetch multi

Template:

    <A pt:fetch="false()" pt:sources="template">
        <B pt:multi="2">
            <c pt:fill="pt:sequence('c one', 'c two')"/>
        </B>
    </A>

Output:

    <A>
        <B>
            <c>c one</c>
        </B>
    <B>
            <c>c two</c>
        </B>
    </A>

It's likely a tail issue, as adding in a following sibling:

    <A pt:fetch="false()" pt:sources="template">
        <B pt:multi="2">
            <c pt:fill="pt:sequence('c one', 'c two')"/>
        </B>
        <d>I've got 'chu</d>
    </A>

Fixes the issue:

    <A>
        <B>
            <c>c one</c>
        </B>
        <B>
            <c>c two</c>
        </B>
        <d>I've got 'chu</d>
    </A>
@LandingEllipse LandingEllipse added the bug Something isn't working label Apr 22, 2021
@LandingEllipse LandingEllipse self-assigned this Apr 22, 2021
LandingEllipse added a commit that referenced this issue Apr 28, 2021
Strip leading and trailing whitespace when interacting with LIDs. This
is a stop-gap measure; longer term we should e.g. define a function in
the label_tools module for retrieving attribute text (could be combined
with a node-type invariant unwrapper, e.g. as in ext.pt.context:_unpack)
to provide extension functions and others with a unified approach.

Related to #4, which could be broadened to cover internal whitespace
issues as there is some crossover with the final representation.
LandingEllipse added a commit that referenced this issue Apr 28, 2021
Strip leading and trailing whitespace when interacting with LIDs. This
is a stop-gap measure; longer term we should e.g. define a function in
the label_tools module for retrieving attribute text (could be combined
with a node-type invariant unwrapper, e.g. as in ext.pt.context:_unpack)
to provide extension functions and others with a unified approach.

Related to #4, which could be broadened to cover internal whitespace
issues as there is some crossover with the final representation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant