2018-08-27 21:04:15 +00:00
|
|
|
import * as plugins from './smarthbs.plugins';
|
2017-05-31 21:59:39 +00:00
|
|
|
|
2018-08-27 21:04:15 +00:00
|
|
|
let safeSyntaxBeginRegex = /{-{/g;
|
|
|
|
let safeSyntaxEndRegex = /}-}/g;
|
2017-05-31 21:59:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* allows you to keep handlebars in place across multiple iterations
|
|
|
|
* helpful when handlebars syntax is used by more than one tool in a build chain
|
|
|
|
*/
|
|
|
|
export let postprocess = async (stringArg: string): Promise<string> => {
|
2018-08-27 21:04:15 +00:00
|
|
|
let processedString = stringArg;
|
|
|
|
processedString = processedString.replace(safeSyntaxBeginRegex, '{{');
|
|
|
|
processedString = processedString.replace(safeSyntaxEndRegex, '}}');
|
|
|
|
return processedString;
|
|
|
|
};
|