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

Fixes #2757 - Adds missing lib to issues on concat.js #2760

Merged
merged 1 commit into from
Jan 13, 2019

Conversation

marimeireles
Copy link
Member

@miketaylr
Copy link
Member

My baddddd, I should have caught this in the other review. 🙈

Copy link
Member

@miketaylr miketaylr left a comment

Choose a reason for hiding this comment

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

@karlcow can we deploy this to staging to verify, just to save you the hassle of cutting new releases, etc? :)

@marimeireles
Copy link
Member Author

It's okay!
Thanks a lot for the help :)

@karlcow karlcow merged commit 40c57d5 into webcompat:master Jan 13, 2019
@karlcow
Copy link
Member

karlcow commented Jan 13, 2019

Thanks! Just a quick deploy on staging.
https://staging.webcompat.com/issues/100

@karlcow
Copy link
Member

karlcow commented Jan 14, 2019

hmm no tests so not detected.
but this markdown-it replacement is also breaking #2548 #1336 (which I don't mind :) but leaves us with dead code.)

var checkIfReportedURLOpeningA = function(tokens) {
// check the tokens to see if we match the following markdown pattern
// **URL**: http....
if (
tokens[0].markup === "**" &&
tokens[1].content === "URL" &&
tokens[2].markup === "**" &&
tokens[3].content === ": " &&
tokens[4].type === "link_open"
) {
return true;
}
return false;
};
// Add rel=nofollow to links
var defaultLinkOpenRender =
md.renderer.rules.link_open ||
function(tokens, idx, options, env, self) {
return self.renderToken(tokens, idx, options);
};
md.renderer.rules.link_open = function(tokens, idx, options, env, self) {
var foundReportedURL = checkIfReportedURLOpeningA(tokens);
// only add target=_blank to a URL that was parsed from the following:
// **URL**: <url>
if (foundReportedURL) {
tokens[idx].attrPush(["target", "_blank"]);
}

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