Skip to content

feat(regex): detect %-style (LaTeX/Matlab) comments - #5

Merged
Yuki-zik merged 2 commits into
masterfrom
yuki-zik-detect-latex-percent-comments
Jul 8, 2026
Merged

Yuki-zik merged 2 commits into
masterfrom
yuki-zik-detect-latex-percent-comments

Conversation

@Yuki-zik

@Yuki-zik Yuki-zik commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Adds % to the default taskvision.regex.regex comment-prefix alternation so TODO/FIXME (and other tags) are detected in %-style comments used by LaTeX, Matlab and Erlang (e.g. % TODO, % FIXME).

Root cause

The default detection regex lacked % in its comment-prefix group:

(//|#|<!--|;|/\*|^|^[ \t]*(-|\d+.))\s*($TAGS)

src/config.js reads this package.json default (no hardcoded fallback), so %-prefixed comments were never matched.

Changes

  • package.json — added % to the taskvision.regex.regex default → (//|#|<!--|;|/\*|%|^|^[ \t]*(-|\d+.))\s*($TAGS).
  • src/extension.js — synced the "reset regex to default" command (markdown-support popup) with the new default so it doesn't undo the fix.
  • reproduce_issue_v9.js — synced the hardcoded default-regex stub for consistency.
  • test/tests.js — added a QUnit case asserting % TODO fix this / % FIXME are detected and that // / # still work.
  • CHANGELOG.md — added an Unreleased entry.
  • agent/tasks.md, agent/timeline.md — governance audit trail per repo AGENTS.md.

Verification

  • npm test → 120 passing, 0 failing (was 119; new %-comment case passes)
  • npm run webpack → build succeeded
  • package.json validated as valid JSON with the updated default

Fixes #3

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Yuki-zik and others added 2 commits July 8, 2026 11:06
Add % to the default taskvision.regex.regex comment-prefix alternation so TODO/FIXME tags in LaTeX/Matlab/Erlang % comments are detected. Sync the reset-to-default command and the repro stub, add a QUnit case asserting % TODO fix this is matched, and record a CHANGELOG entry.

Fixes #3

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
# Conflicts:
#	agent/tasks.md
#	agent/timeline.md
#	reproduce_issue_v9.js
@Yuki-zik
Yuki-zik merged commit 54c4015 into master Jul 8, 2026
6 checks passed
@Yuki-zik
Yuki-zik deleted the yuki-zik-detect-latex-percent-comments branch July 8, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

可以编辑settings.json文件支持更多注释下的TODO识别

2 participants