Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: exclude URL(http/https/ftp) patterns from markdown-it-include target #351

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fukusuket
Copy link

@fukusuket fukusuket commented Jan 14, 2024

Hello, Thank you so much for great tool :)
The issue #181 also occurred in my environment(win10/macOS/vscode-markdown-pdf 1.5.0), so I fixed it.

What Changed

Changed the regular expression targeted by markdown-it-include

About the changed regular expression in this PR

before fix

All cases containing URL link patterns are targets of markdown-it-include as follows:
スクリーンショット 2024-01-14 20 05 32

after fix

URL link patterns are not targets of markdown-it-include as follows: (By using a negative lookahead regular expression)
スクリーンショット 2024-01-14 20 05 39

I would appreciate it if you could review.
Thanks again maintaining great tool !

@fukusuket fukusuket marked this pull request as draft January 14, 2024 12:05
@fukusuket
Copy link
Author

fukusuket commented Jan 14, 2024

Test (issue #181)

Environment

  • macOS Sonoma 14.2.1
  • VSCode 1.85.1

before fix

I have confirmed that the reproduction of the problem before fixing it as follows.
スクリーンショット 2024-01-14 21 21 50

after fix

I have confirmed that there are no errors when exporting pdf and html as follows.
スクリーンショット 2024-01-14 21 26 45

@fukusuket
Copy link
Author

Test (other pattern)

after fix

I have confirmed that there are no errors when exporting pdf and html as follows.
スクリーンショット 2024-01-14 21 43 05

@fukusuket fukusuket marked this pull request as ready for review January 14, 2024 12:44
@fukusuket fukusuket changed the title fix: exclude URL patterns from markdown-it-include target fix: exclude URL(http/https/ftp) patterns from markdown-it-include target Jan 14, 2024
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.

None yet

1 participant