mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-14 21:47:13 +00:00
[PR #459] [MERGED] Write custom rel into links #1043
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:fix456📝 Commits (1)
831a529fix456📊 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.
I consider that the name
RelXXXis much suitable thanReferralXXXmentioned in #456 . For example,UseRelLinkshas a straightfoward meaning to set rel property in links. If so, I will make another change.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.