Add <%br= %> jqhtml syntax docs, class override detection, npm update
Document event handler placement and model fetch clarification 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
10
node_modules/@jqhtml/parser/dist/codegen.js
generated
vendored
10
node_modules/@jqhtml/parser/dist/codegen.js
generated
vendored
@@ -544,6 +544,10 @@ export class CodeGenerator {
|
||||
// Use the standard result pattern for proper handling
|
||||
code = `(() => { const result = ${trimmedCode};; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })();`;
|
||||
}
|
||||
else if (expr.nl2br) {
|
||||
// <%br= %> - escaped with newlines converted to <br />
|
||||
code = `(() => { const result = ${expr.code}; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html_nl2br(result)); } })();`;
|
||||
}
|
||||
else if (expr.escaped) {
|
||||
code = `(() => { const result = ${expr.code}; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })();`;
|
||||
}
|
||||
@@ -776,6 +780,10 @@ export class CodeGenerator {
|
||||
// Use the standard result pattern for proper handling
|
||||
output = `(() => { const result = ${trimmedCode};; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })();`;
|
||||
}
|
||||
else if (node.nl2br) {
|
||||
// <%br= %> - escaped with newlines converted to <br />
|
||||
output = `(() => { const result = ${node.code}; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html_nl2br(result)); } })();`;
|
||||
}
|
||||
else if (node.escaped) {
|
||||
// Single-line expression handler for escaped output
|
||||
output = `(() => { const result = ${node.code}; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })();`;
|
||||
@@ -1377,7 +1385,7 @@ export class CodeGenerator {
|
||||
for (const [name, component] of this.components) {
|
||||
code += `// Component: ${name}\n`;
|
||||
code += `jqhtml_components.set('${name}', {\n`;
|
||||
code += ` _jqhtml_version: '2.3.34',\n`; // Version will be replaced during build
|
||||
code += ` _jqhtml_version: '2.3.35',\n`; // Version will be replaced during build
|
||||
code += ` name: '${name}',\n`;
|
||||
code += ` tag: '${component.tagName}',\n`;
|
||||
code += ` defaultAttributes: ${this.serializeAttributeObject(component.defaultAttributes)},\n`;
|
||||
|
||||
Reference in New Issue
Block a user