123456 |
- import { require_markup_templating } from './chunk-ZZ4BVPK3.js';
- import { __commonJS } from './chunk-BS5JN4MX.js';
- var require_smarty=__commonJS({"../../node_modules/refractor/lang/smarty.js"(exports,module){var refractorMarkupTemplating=require_markup_templating();module.exports=smarty;smarty.displayName="smarty";smarty.aliases=[];function smarty(Prism){Prism.register(refractorMarkupTemplating),function(Prism2){Prism2.languages.smarty={comment:{pattern:/^\{\*[\s\S]*?\*\}/,greedy:!0},"embedded-php":{pattern:/^\{php\}[\s\S]*?\{\/php\}/,greedy:!0,inside:{smarty:{pattern:/^\{php\}|\{\/php\}$/,inside:null},php:{pattern:/[\s\S]+/,alias:"language-php",inside:Prism2.languages.php}}},string:[{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0,inside:{interpolation:{pattern:/\{[^{}]*\}|`[^`]*`/,inside:{"interpolation-punctuation":{pattern:/^[{`]|[`}]$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},variable:/\$\w+/}},{pattern:/'(?:\\.|[^'\\\r\n])*'/,greedy:!0}],keyword:{pattern:/(^\{\/?)[a-z_]\w*\b(?!\()/i,lookbehind:!0,greedy:!0},delimiter:{pattern:/^\{\/?|\}$/,greedy:!0,alias:"punctuation"},number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,variable:[/\$(?!\d)\w+/,/#(?!\d)\w+#/,{pattern:/(\.|->|\w\s*=)(?!\d)\w+\b(?!\()/,lookbehind:!0},{pattern:/(\[)(?!\d)\w+(?=\])/,lookbehind:!0}],function:{pattern:/(\|\s*)@?[a-z_]\w*|\b[a-z_]\w*(?=\()/i,lookbehind:!0},"attr-name":/\b[a-z_]\w*(?=\s*=)/i,boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\[\](){}.,:`]|->/,operator:[/[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,/\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,/\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/]},Prism2.languages.smarty["embedded-php"].inside.smarty.inside=Prism2.languages.smarty,Prism2.languages.smarty.string[0].inside.interpolation.inside.expression.inside=Prism2.languages.smarty;var string=/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,smartyPattern=RegExp(/\{\*[\s\S]*?\*\}/.source+"|"+/\{php\}[\s\S]*?\{\/php\}/.source+"|"+/\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>)*\})*\})*\}/.source.replace(/<str>/g,function(){return string.source}),"g");Prism2.hooks.add("before-tokenize",function(env){var smartyLiteralStart="{literal}",smartyLiteralEnd="{/literal}",smartyLiteralMode=!1;Prism2.languages["markup-templating"].buildPlaceholders(env,"smarty",smartyPattern,function(match){return match===smartyLiteralEnd&&(smartyLiteralMode=!1),smartyLiteralMode?!1:(match===smartyLiteralStart&&(smartyLiteralMode=!0),!0)});}),Prism2.hooks.add("after-tokenize",function(env){Prism2.languages["markup-templating"].tokenizePlaceholders(env,"smarty");});}(Prism);}}});
- export { require_smarty };
|