Skip to content

Use plaintext part of the MDN template #2078

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

saschanaz
Copy link
Contributor

Depends on #2077.

Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

// For all other cases, the last argument is the plaintext
return trimEnds(args.at(-1)!);
})
// Keep link text but remove URLs
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically you can add links in the comments. So why not include links?
Just a suggestion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That part is from your PR 😛

We can do it, but not here.

Copy link
Contributor

Choose a reason for hiding this comment

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

That part is from your PR 😛

We can do it, but not here.

Correct 😃
I will open another PR for it

The existing regex was expecting `{{domxref(text)}}` form and did not dela with `{{domxref(link, text}}` form. This patch fixes that.

Many more lines added but regex was reduced. Despite that I think it's now more readable.
@saschanaz saschanaz force-pushed the fix-comment-plaintext branch from 634f18f to 9b19c0b Compare July 20, 2025 21:46
@saschanaz
Copy link
Contributor Author

Looking it again, it should probably be wrapped as a code than plaintext.

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.

3 participants