StarlaneStudios / vscode-comment-anchors

⚓A Visual Studio Code extension that adds support for comment anchors 🔭
https://marketplace.visualstudio.com/items?itemName=ExodiusStudios.comment-anchors
MIT License
205 stars 32 forks source link

Permit to customize LINK regex #210

Open RobinDev opened 10 months ago

RobinDev commented 10 months ago

This proposal permit to customize link regex

(i would like to be able to grab them into inline comment so i need to change the regex to ^(\.{1,2}[/\\])?([^:# ]+)?(:\d+|#[\w-]+)?, eg :


<!-- LINK example.html -->
<?php // LINK example.php ?>
<?php /* LINK example.php */ ?>
macjuul commented 7 months ago

Looks like a good change to me. Would you be so kind to additionally declare this new setting in the package.json as well as the README.md?

From a code style perspective it would be preferred to leave the default regex as a constant as it was originally, however renamed to DEFAULT_LINK_REGEX.

Nevertheless, thanks for the PR!