Skip to content

Permit to customize LINK regex#210

Open
RobinDev wants to merge 1 commit intoStarlaneStudios:masterfrom
RobinDev:patch-1
Open

Permit to customize LINK regex#210
RobinDev wants to merge 1 commit intoStarlaneStudios:masterfrom
RobinDev:patch-1

Conversation

@RobinDev
Copy link

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 */ ?>

@RobinDev RobinDev changed the title Permit to use in inline comment the LINK tag Permit to customize LINK regex Oct 26, 2023
@macjuul
Copy link
Member

macjuul commented Jan 18, 2024

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!

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.

2 participants