[PR #459] [MERGED] Write custom rel into links #1043

Closed
opened 2026-01-29 14:48:58 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/459
Author: @iskcal
Created: 8/3/2020
Status: Merged
Merged: 8/6/2020
Merged by: @xoofx

Base: masterHead: fix456


📝 Commits (1)

📊 Changes

6 files changed (+213 additions, -22 deletions)

View changed files

src/Markdig.Tests/TestReferralLinks.cs (+71 -0)
📝 src/Markdig/Extensions/NoRefLinks/NoFollowLinksExtension.cs (+12 -13)
src/Markdig/Extensions/ReferralLinks/ReferralLinksExtension.cs (+45 -0)
📝 src/Markdig/MarkdownExtensions.cs (+29 -3)
📝 src/Markdig/Renderers/Html/Inlines/AutolinkInlineRenderer.cs (+28 -3)
📝 src/Markdig/Renderers/Html/Inlines/LinkInlineRenderer.cs (+28 -3)

📄 Description

This fixes #456 .

It allows writing custom rel into links. More tests are added.

I think there are two things that needs to be confirmed.

  1. I consider that the name RelXXX is much suitable than ReferralXXX mentioned in #456 . For example, UseRelLinks has a straightfoward meaning to set rel property in links. If so, I will make another change.

  2. Considering compatibility, I didn't remove the parts related to "nofollow" rel in links. Instead, I marked the parts as obsolete, such as NoFollowLinksExtension. I don't know whether it is an acceptable way.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/xoofx/markdig/pull/459 **Author:** [@iskcal](https://github.com/iskcal) **Created:** 8/3/2020 **Status:** ✅ Merged **Merged:** 8/6/2020 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `fix456` --- ### 📝 Commits (1) - [`831a529`](https://github.com/xoofx/markdig/commit/831a529338b36392348aac1ca25db36d62e0fa95) fix456 ### 📊 Changes **6 files changed** (+213 additions, -22 deletions) <details> <summary>View changed files</summary> ➕ `src/Markdig.Tests/TestReferralLinks.cs` (+71 -0) 📝 `src/Markdig/Extensions/NoRefLinks/NoFollowLinksExtension.cs` (+12 -13) ➕ `src/Markdig/Extensions/ReferralLinks/ReferralLinksExtension.cs` (+45 -0) 📝 `src/Markdig/MarkdownExtensions.cs` (+29 -3) 📝 `src/Markdig/Renderers/Html/Inlines/AutolinkInlineRenderer.cs` (+28 -3) 📝 `src/Markdig/Renderers/Html/Inlines/LinkInlineRenderer.cs` (+28 -3) </details> ### 📄 Description This fixes #456 . It allows writing custom rel into links. More tests are added. I think there are two things that needs to be confirmed. 1. I consider that the name `RelXXX` is much suitable than `ReferralXXX` mentioned in #456 . For example, `UseRelLinks` has a straightfoward meaning to set rel property in links. If so, I will make another change. 2. Considering compatibility, I didn't remove the parts related to "nofollow" rel in links. Instead, I marked the parts as obsolete, such as `NoFollowLinksExtension`. I don't know whether it is an acceptable way. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 14:48:58 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1043