Repository navigation
fix(javascript): sync JSDoc continuation patterns with TypeScript language config - #308433
Merged
Dmitriy Vasyura (dmitrivMS) merged 2 commits intoJul 27, 2026
Conversation
Both language configuration files carry a comment stating they should
stay in sync with each other, but two JSDoc-related regex patterns had
drifted in the JavaScript file.
1. `unIndentedLinePattern` — the third alternative that matches an
in-progress JSDoc continuation line (`* comment text`) required a
literal space immediately before the `*`:
Before: `^(\\t|[ ])*[ ]\\*([ ]...`
After: `^(\\t|[ ])*\\*([ ]...`
2. `onEnterRules` — the `beforeText` pattern for the rule that appends
`* ` when pressing Enter inside a JSDoc block had the same extra
space requirement.
The TypeScript configuration does not require this leading space, which
means that JSDoc comments whose `*` continuation lines are indented with
tabs only (e.g. `\t* line`) were recognized correctly in TypeScript
files but not in JavaScript files. After this change both files use the
same permissive pattern.
Also aligns the `wordPattern` character-class order (`@~` → `@~`,
purely cosmetic, no behavioral difference).
Matt Bierner (mjbvz)
approved these changes
Apr 8, 2026
Michael Lively (Yoyokrazy)
approved these changes
Apr 8, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Synchronizes JavaScript JSDoc continuation regexes with TypeScript so tab-indented * lines continue correctly.
Changes:
- Removes mandatory spaces before JSDoc continuation markers.
- Aligns equivalent JavaScript and TypeScript regex patterns.
Show a summary per file
| File | Description |
|---|---|
extensions/javascript/javascript-language-configuration.json |
Updates JSDoc continuation and matching configuration patterns. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Medium
Raymond Zhao (rzhao271)
approved these changes
Jul 27, 2026
Dmitriy Vasyura (dmitrivMS)
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both configs carry a comment saying they should stay in sync, but two JSDoc continuation regex patterns had drifted in the JavaScript config.
The JS config required a literal space before
*in JSDoc continuation lines; the TS config did not. This caused Enter-key JSDoc continuation to silently not trigger in.jsfiles when the*was indented only with tabs.Fixes by removing the extra mandatory space from the two patterns, matching the TypeScript config.