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

Chore: update blogpost template #12154

Merged
merged 1 commit into from Aug 26, 2019
Merged

Chore: update blogpost template #12154

merged 1 commit into from Aug 26, 2019

Conversation

@mysticatea
Copy link
Member

mysticatea commented Aug 23, 2019

What is the purpose of this pull request? (put an "X" next to item)

[X] Other, please explain: update the template to post blogs.

What changes did you make? (Give an overview)

This PR updates templates/blogpost.md.ejs to recognize eslint/rfcs#123-like links. This will prevent to make wrong links like:

Is there anything you'd like reviewers to focus on?

Nothing in particular.

@mysticatea mysticatea added the chore label Aug 23, 2019
@@ -14,7 +14,7 @@ const RULE_REGEX = new RegExp(`\`?\\b(${ruleList.join("|")})\\b\`?`, "g");
function linkify(line) {
return line
.replace(/#(\d+)/g, "[#$1](https://github.com/eslint/eslint/issues/$1)")
.replace(/([^\s/]+[/][^\s/]+)?#(\d+)/g, (_, repo, num) => `[${repo || ""}#${num}](https://github.com/${repo || "eslint/eslint"}/issues/${num})`)

This comment has been minimized.

Copy link
@ilyavolodin

ilyavolodin Aug 23, 2019

Member

Sorry, it's tough to read those RegExp. Since the first group is optional, wouldn't repo variable contain ticket number if repo is not present?

This comment has been minimized.

Copy link
@mysticatea

mysticatea Aug 24, 2019

Author Member

No, repo will be undefined if repo is not present.

Copy link
Member

kaicataldo left a comment

LGTM, thanks!

@kaicataldo kaicataldo merged commit 77f8ed1 into master Aug 26, 2019
9 checks passed
9 checks passed
commit-message Commit message follows guidelines
Details
continuous-integration Build #20190823.8 succeeded
Details
continuous-integration (Test on Node.js 10 (Linux)) Test on Node.js 10 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Linux)) Test on Node.js 12 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Windows)) Test on Node.js 12 (Windows) succeeded
Details
continuous-integration (Test on Node.js 12 (macOS)) Test on Node.js 12 (macOS) succeeded
Details
continuous-integration (Test on Node.js 8 (Linux)) Test on Node.js 8 (Linux) succeeded
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details
@kaicataldo

This comment has been minimized.

Copy link
Member

kaicataldo commented Aug 26, 2019

Thanks for contributing to ESLint!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.