Skip to content

Commit be63d2b

Browse files
committed
Remove suggestions for version numbers
1 parent c6101ad commit be63d2b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "elastic-docs-v3-utilities",
33
"displayName": "Elastic Docs Utilities",
44
"description": "Utilities for Elastic Docs authoring",
5-
"version": "0.12.1",
5+
"version": "0.12.2",
66
"publisher": "Elastic",
77
"repository": {
88
"type": "git",

src/substitutionValidationProvider.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,13 @@ export class SubstitutionValidationProvider {
6666
const lineOffset = text.substring(0, frontmatterEnd).split('\n').length - 1;
6767

6868
// PERFORMANCE OPTIMIZATION: Pre-compile all regex patterns
69+
// Exclude version substitutions since version numbers are ambiguous without context
6970
const compiledPatterns = new Map<string, RegExp>();
7071
for (const [key, value] of Object.entries(substitutions)) {
72+
// Skip version substitutions - version numbers are too ambiguous to suggest replacements
73+
if (key.startsWith('version.')) {
74+
continue;
75+
}
7176
if (value.length > 0) { // Skip empty values
7277
const escapedValue = this.escapeRegExp(value);
7378
compiledPatterns.set(key, new RegExp(`(\\W|^)${escapedValue}(\\W|$)`, 'gm'));

0 commit comments

Comments
 (0)