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

Legacy text merging #1124

Merged
merged 3 commits into from
Oct 30, 2023
Merged

Legacy text merging #1124

merged 3 commits into from
Oct 30, 2023

Conversation

jasmith-hs
Copy link
Contributor

I broke the legacy behaviour in #1122. This legacy behaviour was added in #599.

With trimBlocks and lstripBlocks turned off, the legacy behaviour for handling notes is different than for Jinja:

123
{%- if true -%}
{#
     Some comment
    #}
{% print '123' %}
{% endif %}

Which is output differently in Jinjava vs jinja:
Legacy Jinjava output:

123123

Jinja ouptut:

123
123

Setting the legacy override to true will yield the proper output:

JinjavaConfig
  .newBuilder()
  .withLegacyOverrides(
    LegacyOverrides.newBuilder().withAllowAdjacentTextNodes(true).build()
  )
  .build()

@jasmith-hs jasmith-hs merged commit 3b99a0a into master Oct 30, 2023
4 checks passed
@jasmith-hs jasmith-hs deleted the legacy-text-merging branch October 30, 2023 20:55
jasmith-hs added a commit that referenced this pull request Oct 31, 2023
This reverts commit 3b99a0a, reversing
changes made to 264ac2b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant