Skip to content

Commit

Permalink
feat: variable completion items for array items
Browse files Browse the repository at this point in the history
  • Loading branch information
Orchardxyz committed Aug 7, 2024
1 parent 9f726df commit 7b35bb0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to the "vscode-freemarker-tipster" extension will be documen

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

### Changed

- Variable completion items for array items.

## [1.2.0] - 2024-08-07

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/provideVariableCompletionItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { variablePattern } from "./patterns";
const assignMatchReg = new RegExp(`<#assign\\s+(${variablePattern})\\s*=`);
const functionMatchReg = new RegExp(`<#function\\s+(${variablePattern})\\s*`);
const typingVarReg = new RegExp(
`((?:<#if|<#elseif|<#list|<#switch)\\s+|(?:\\$\\{|=|\\(|,|&&|\\|\\|)\\s*)(${variablePattern})$`
`((?:<#if|<#elseif|<#list|<#switch)\\s+|(?:\\$\\{|=|\\(|\\[|,|&&|\\|\\|)\\s*)(${variablePattern})$`
);

function isTypingVariable(lineText: string) {
Expand Down

0 comments on commit 7b35bb0

Please sign in to comment.