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

Make the contents of the raw blocks regex pattern non-greedy (#2241) #2252

Merged
merged 2 commits into from
Apr 1, 2020

Conversation

beckjake
Copy link
Contributor

resolves #2241

Description

This fixes an issue where a file with multiple raw blocks got treated as one big one, from the first {% raw %} to the last {% endraw %}. The trick was to add a non-greedy qualifier to the regex pattern that matches raw block bodies. I also added a unit test.

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt next" section.

This fixes an issue where a file with multiple raw blocks got treated as one _big_ one
 - it extended from the first {% raw %} to the last {% endraw %}
@cla-bot cla-bot bot added the cla:yes label Mar 26, 2020
@beckjake beckjake requested a review from drewbanin March 26, 2020 20:03
Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@beckjake
Copy link
Contributor Author

beckjake commented Apr 1, 2020

Merging this before tests run - just resolved a CHANGELOG.md conflict

@beckjake beckjake merged commit c146e50 into dev/0.16.1 Apr 1, 2020
@beckjake beckjake deleted the fix/docs-blocks-embedding branch April 1, 2020 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants