UNPKG

@awesome-fe/translate

Version:
24 lines 806 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.htmlCommentBlockTokenizer = void 0; var pattern = /^<!--(.*?)-->/s; function htmlCommentBlockTokenizer(eat, value, silent) { var matches = pattern.exec(value); if (matches) { try { if (silent || !matches) { // either we are not eating (silent) or the match failed return !!matches; } return eat(matches[0])({ type: 'comment', value: matches[1], }); } catch (e) { this.file.fail('Unmatched plain HTML inline tag: ' + e.message); } } } exports.htmlCommentBlockTokenizer = htmlCommentBlockTokenizer; //# sourceMappingURL=html-comment-block-tokenizer.js.map