/*
 * Copyright (c) 2018, 2025, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const RULE_NAME="oj-html-attr-expr-delims";const LONG="Unmatched attribute expression delimiters are not permitted.";function getName(){return RULE_NAME};function getShortDescription(){return LONG};function getDescription(){return LONG};function register(){return{"attrexpr":_onExpr}};function _onExpr(ruleCtx,attrName,attrValue){attrValue=attrValue.trim();if(attrName.charAt(0)===":"){attrName=attrName.substring(1)}if(_badExprDelims(attrValue)){let issue=new ruleCtx.Issue(`Attribute '${attrName}' has unmatched expression delimiters.`);ruleCtx.reporter.addIssue(issue,ruleCtx)}};function _badExprDelims(expr){return expr.startsWith("[[")&&!expr.endsWith("]]")||expr.startsWith("{{")&&!expr.endsWith("}}")};module.exports={getName,getDescription,getShortDescription,register};