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: add url escaping to markdown processing #1898 #1934

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jeengland
Copy link

Fix for issue #1898

I saw in the issue thread it was suggested to create a goldmark extension, which I'm still open to doing but I wanted to suggest a simpler regex based solution in this PR. Works on the md from the issue as well as a few other test cases:

memo: |md
  <a href="https://www.google.com/search?q=d2&newwindow=1">d2</a>
|

@jeengland jeengland marked this pull request as draft May 3, 2024 19:01
@jeengland jeengland marked this pull request as ready for review May 3, 2024 19:04
@jeengland jeengland force-pushed the jeengland_add-markdown-url-escaping branch from 49ce70e to 0a05975 Compare May 3, 2024 19:06
Copy link
Collaborator

@alixander alixander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lib/textmeasure/markdown.go Outdated Show resolved Hide resolved
lib/textmeasure/markdown.go Outdated Show resolved Hide resolved
@jeengland jeengland force-pushed the jeengland_add-markdown-url-escaping branch from 8de9024 to 617924d Compare May 3, 2024 21:07
@jeengland jeengland force-pushed the jeengland_add-markdown-url-escaping branch from 617924d to ea360d9 Compare May 3, 2024 21:08
@jeengland
Copy link
Author

Reference

Looking at adding a test now, should I be adding a test within the TestCompile block? Also when I do do that, it prompts me to rerun the test with $TA=1 and it edits a bunch of files. Is that correct or am I doing something incorrectly?

@alixander
Copy link
Collaborator

@jeengland Yeah that's right

TA=1 ./ci/test.sh ./d2compiler to rerun compiler tests and accept the results. You don't need to verify the AST for this test because you're just checking it compiles at all.

@alixander
Copy link
Collaborator

Hi @jeengland are you still interested in pursuing this PR? If not I can push to this branch, it's just the test remaining

@jeengland
Copy link
Author

Hi @alixander sorry about the delay, I had an uptick in obligations this last few weeks. I'll make this a priority to look at tomorrow!

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

2 participants