🚀 Handlebars Template System
This is a breaking change release that migrates from simple variable templates to a powerful Handlebars templating system.
⚠️ Breaking Changes
- Template syntax changed from
%variableto{{variable}}format - Line numbers now provided as separate
startLineandendLinevariables - All existing custom formats need to be updated (see migration guide below)
✨ New Features
- Handlebars templating engine for powerful format customization
- Helper functions:
replacefor regex replacement,encodeURIComponentfor URL encoding - Conditional logic support (e.g.,
{{#if endLine}}) - Enhanced error handling for malformed templates
- Comprehensive test suite for template functionality
📋 Migration Guide
Old format (no longer supported):
{
"name": "Path with line",
"format": "%r:%l"
}New format:
{
"name": "Path with line",
"format": "{{relativePath}}:{{startLine}}{{#if endLine}}-{{endLine}}{{/if}}"
}Variable mapping:
%p→{{absolutePath}}%r→{{relativePath}}%n→{{fileName}}%s→{{selectedText}}%l→{{startLine}}{{#if endLine}}-{{endLine}}{{/if}}
🎯 Why This Change?
The new Handlebars system provides much more powerful templating capabilities including conditional logic, helper functions, and better extensibility for future features.