On tag handler

@inner
@param {Object} file the template file
@param {string} tagName the tag name to encounter
@param {string=} replaceTagName the old tag name to replace
function handleOnTag(file, tagName, replaceTagName) {
    let tags = file.tags;
    tags || (tags = file.tags = {});
    if (replaceTagName && tags.hasOwnProperty(replaceTagName)) {
        delete tags[replaceTagName];
    }

    tags[tagName] = true;
}