Skip to content

Add linksInNewTab config option - #1030

Closed
ocdtrekkie wants to merge 2 commits into
markedjs:masterfrom
ocdtrekkie:add-linksinnewtab
Closed

ocdtrekkie wants to merge 2 commits into
markedjs:masterfrom
ocdtrekkie:add-linksinnewtab

Conversation

@ocdtrekkie

Copy link
Copy Markdown

All credit due to @drmuey, reference is #659 for his work. This should merge against the current codebase.

@joshbruce joshbruce added this to the 0.5.0 - Architecture and extensibility milestone Jan 22, 2018
@joshbruce

Copy link
Copy Markdown
Member

Why not post the Issue instead of a PR as was suggested?

This still doesn't comply with the specs.
Still doesn't have tests.
And doesn't fit with the focus of the community right now.

Flagged for 0.5.0 at the moment.

@ocdtrekkie

Copy link
Copy Markdown
Author

You wanted a big green button. I am looking at how to add a test and will add it to this branch.

@joshbruce

Copy link
Copy Markdown
Member

Taking 'em one at a time. I appreciate the zeal. Let's see where it goes. :)

@joshbruce

Copy link
Copy Markdown
Member

I should note, we haven't fully fleshed out the extensibility approach; so, not sure how much will change by the time we actually get to this...or if we will, to be honest. The more Marked takes on, the more chance there is for Marked to be in error...none of us are paid to maintain the code; so, it is in all of our best interests to keep it small - see #964

@ocdtrekkie

Copy link
Copy Markdown
Author

I wrangled the testing setup a bit, the Linux VM I had handy is... outdated. I got an NPM error before and after adding my test, but after tweaking it a bit (I missed adding the <p> tags originally), it shows as completed.

@ocdtrekkie

ocdtrekkie commented Jan 22, 2018 •

Copy link
Copy Markdown
Author

I completely understand the desire for brevity. I believe this PR is very brief, and it touches an extremely small amount of code. I believe the likelihood of this PR leading to bugs is small. The only thing I can think of that someone will need to be aware of, is that if code is added to add any other properties to the <a> structure, they will need to have a leading space, as this code does (and the title tag also does), before the new property. It should coexist with any new properties added similarly to itself.

@styfle

styfle commented Jul 10, 2018

Copy link
Copy Markdown
Member

I think you would want to add a few additional attributes to avoid cross-origin vulnerabilities such as rel=noopener. Also what about rel=nofollow? It's hard to know what the user wants in this scenario.

@ocdtrekkie

Copy link
Copy Markdown
Author

@styfle The original PR for this feature was created in 2015. I have pretty much abandoned all hope for marked at this point.

@UziTech

UziTech commented Jul 11, 2018

Copy link
Copy Markdown
Member

I think this feature would be better as an extension. it shouldn't be too hard to provide a renderer that does this.

@styfle

styfle commented Jul 11, 2018

Copy link
Copy Markdown
Member

@UziTech Agreed, there are too many variables here that it doesn't make sense to be in core.

@styfle styfle closed this Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants