๐Ÿ‘Œ IMPROVE: Allow for opening external links in new tabs (#856) by marjuscako ยท Pull Request #857 ยท executablebooks/MyST-Parser

@marjuscako

Add support to enable external links to open in a new tab. Expose the configuration option myst_links_external_new_tab, which if set will set all URL links to open in a new tab on the browser.

Besides that, we allow the user to set the target and rel attributes when using the extension inline_attrs (#820).

Closes #820
Closes #856

@welcome

Thanks for submitting your first pull request! You are awesome! ๐Ÿค—

If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.

Welcome to the EBP community! ๐ŸŽ‰

chrisjsewell

Choose a reason for hiding this comment

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

@marjuscako

Add support to enable external links to open in a new tab. Expose the
configuration option myst_links_external_new_tab, which if set will set
all URL links to open in a new tab on the browser.

Besides that, we allow the user to set the target and rel attributes
when using the extension inline_attrs (executablebooks#820).

Closes executablebooks#820
Closes executablebooks#856

Signed-off-by: Marjus Cako <marios.cako@hpe.com>

@marjuscako

Thanks a lot for the pointer @chrisjsewell . I updated my commit with a couple of tests for these features. Please let me know if that will suffice!

@chrisjsewell

@chrisjsewell chrisjsewell changed the title ๐Ÿ‘Œ IMPROVE: External links in new tab (#856) ๐Ÿ‘Œ IMPROVE: Allow for opening external links in new tabs (#856)

Mar 26, 2024

@codecov-commenter

Codecov Report

All modified and coverable lines are covered by tests โœ…

Project coverage is 90.10%. Comparing base (abcc087) to head (06a63f3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #857      +/-   ##
==========================================
+ Coverage   90.09%   90.10%   +0.01%     
==========================================
  Files          24       24              
  Lines        3372     3377       +5     
==========================================
+ Hits         3038     3043       +5     
  Misses        334      334              
Flag Coverage ฮ”
pytests 90.10% <100.00%> (+0.01%) โฌ†๏ธ

Flags with carried forward coverage won't be shown. Click here to find out more.

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

chrisjsewell

Choose a reason for hiding this comment

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

great cheers!

@welcome

Congrats on your first merged pull request in this project! ๐ŸŽ‰
congrats

Thank you for contributing, we are very proud of you! โค๏ธ

chrisjsewell added a commit to sphinx-doc/sphinx that referenced this pull request

Jun 28, 2024

@chrisjsewell