dbt-meshify icon indicating copy to clipboard operation
dbt-meshify copied to clipboard

fix for spaces and quotes in jinja block matching

Open dave-connors-3 opened this issue 9 months ago • 0 comments

closes #205

Some users saw issues when we collected jinja blocks due to a few shortcomings of our regex matching for jinja blocks, namely:

  1. spaces on either side of the start/end lines of the jinja blocks {%docs my_docs %} vs {% docs my_docs %}
  2. 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!

dave-connors-3 avatar May 08 '24 23:05 dave-connors-3