Closed benpolinsky closed 6 years ago
Hi @benpolinsky
Yes that is correct. The default is
const DEFAULT_PATTERN = (key) => (
new RegExp(`{{${key}}}`, 'g')
);
and it can be found here: https://github.com/yeojz/metalsmith-react-templates/blob/master/src/jsx-render-engine/strategy/naive.js
It will be called when we're replacing values in the baseFile https://github.com/yeojz/metalsmith-react-templates/blob/master/src/jsx-render-engine/utils/applyBaseFile.js
Closing this. Please re-open if you still have issues.
Hi,
I'm attempting to use a different templateTag to render my contents into, but I'm having difficulty getting anything to work.
Do you just pass a function to templateTag?
reactTemplates({ templateTag: function(key){return new RegExp(pattern, 'g')} })
Looking through the code, I couldn't find the part where you were checking the options and applying a new templateTag based on this function.