// local files
import { TagWrapper } from "./interfaces";

export const replaceTags = ([symbol, tag]: TagWrapper) => {
    const regExp = new RegExp(`\\${symbol}([\\s\\S]*?)\\${symbol}`, 'g');

    return (str: string) => str.replace(regExp, `<${tag}>$1</${tag}>`);
}
