Unmatched Template Error
<w:p>
<w:pPr>
<w:pStyle w:val="Body 2"/>
<w:bidi w:val="0"/>
</w:pPr>
<w:r>
<w:t>#BEGIN_ROW:EXPERIENCES_TITLE#</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:pStyle w:val="Heading"/>
<w:bidi w:val="0"/>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Didot" w:cs="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:eastAsia="Arial Unicode MS"/>
<w:rtl w:val="0"/>
</w:rPr>
<w:t>$EACH:EXPERIENCE_TITLE$</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:pStyle w:val="Body 2"/>
<w:bidi w:val="0"/>
</w:pPr>
<w:r>
<w:t>#END_ROW:EXPERIENCES_TITLE#</w:t>
</w:r>
</w:p>
I'm zipping the following xml into a docx template. (I'm not posting the entire xml doc)
And I'm inserting the following data into the template: {'experiences_title' => [{'experience_title' => "Experience"}}
It doesn't seem to recognize any of my row markers. When I try to generate the doc, I'm getting:
unmatched template markers: #BEGIN_ROW:EXPERIENCES_TITLE# nil: true, #END_ROW:EXPERIENCES_TITLE# nil: true. This could be because word broke up tags with it's own xml entries. See README.
I'm also getting this error. Is there a fix for this?
I'm also getting the same error. Is it mandatory to loop inside the table? When I'm looping inside the table, it works fine but when I do the looping(#BEGIN_ROW:XXX# and #END_ROW:XXX#) without table, I'm getting the above error.
@nav0285 I came up with a fix for this. It causes the build to fail but it works for what I needed it to do. https://github.com/jawspeak/ruby-docx-templater/pull/13
@nav0285,
My last comment has a link to the pull request, in which you can see the code changes. The author has a "fail" statement when the array markers are unmatched. I changed it so that rather than failing and raising error, it just returns the XML at that point in the method.
Happy to merge #13 if the tests are passing. ok to change the tests too based on this new behavior.