dbt-meshify
dbt-meshify copied to clipboard
fix for spaces and quotes in jinja block matching
closes #205
Some users saw issues when we collected jinja blocks due to a few shortcomings of our regex matching for jinja blocks, namely:
- spaces on either side of the start/end lines of the jinja blocks
{%docs my_docs %}
vs{% docs my_docs %}
- special characters in docs names
The fix for problem 1 was fairly straightforward, just updating our space matches to be zero or more
. In testing, i also found we were lacking support for default values that included quote characters.
I didn't make any adjustments for special characters, but did add a test for a block name with a special character, and it seemed to pass. Happy to change that if this test is insufficient!