forked from xoofx/markdig
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request xoofx#195 from leotsarev/remove-mailto
AutoLinkParser should to remove mailto: in outputted text
- Loading branch information
Showing
4 changed files
with
19 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ And a plain www.google.com | |
. | ||
<p>This is a <a href="http://www.google.com">http://www.google.com</a> URL and <a href="https://www.google.com">https://www.google.com</a> | ||
This is a <a href="ftp://test.com">ftp://test.com</a> | ||
And a <a href="mailto:[email protected]">mailto:[email protected]</a> | ||
And a <a href="mailto:[email protected]">[email protected]</a> | ||
And a plain <a href="http://www.google.com">www.google.com</a></p> | ||
```````````````````````````````` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20340,7 +20340,7 @@ public void ExtensionsHeadingAutoIdentifiers_Example010() | |
public partial class TestExtensionsHeadingAutoIdentifiers | ||
{ | ||
[Test] | ||
public void Example011() | ||
public void ExtensionsHeadingAutoIdentifiers_Example011() | ||
{ | ||
// Example 11 | ||
// Section: Extensions Heading Auto Identifiers | ||
|
@@ -20702,7 +20702,7 @@ public void ExtensionsYAMLfrontmatterdiscard_Example006() | |
public partial class TestExtensionsYAMLfrontmatterdiscard | ||
{ | ||
[Test] | ||
public void Example007() | ||
public void ExtensionsYAMLfrontmatterdiscard_Example007() | ||
{ | ||
// Example 7 | ||
// Section: Extensions YAML frontmatter discard | ||
|
@@ -20728,7 +20728,7 @@ public void Example007() | |
public partial class TestExtensionsYAMLfrontmatterdiscard | ||
{ | ||
[Test] | ||
public void ExtensionsYAMLfrontmatterdiscard_Example007() | ||
public void ExtensionsYAMLfrontmatterdiscard_Example008() | ||
{ | ||
// Example 8 | ||
// Section: Extensions YAML frontmatter discard | ||
|
@@ -20751,7 +20751,7 @@ public void ExtensionsYAMLfrontmatterdiscard_Example007() | |
public partial class TestExtensionsYAMLfrontmatterdiscard | ||
{ | ||
[Test] | ||
public void ExtensionsYAMLfrontmatterdiscard_Example008() | ||
public void ExtensionsYAMLfrontmatterdiscard_Example009() | ||
{ | ||
// Example 9 | ||
// Section: Extensions YAML frontmatter discard | ||
|
@@ -20799,11 +20799,11 @@ public void ExtensionsAutoLinks_Example001() | |
// Should be rendered as: | ||
// <p>This is a <a href="http://www.google.com">http://www.google.com</a> URL and <a href="https://www.google.com">https://www.google.com</a> | ||
// This is a <a href="ftp://test.com">ftp://test.com</a> | ||
// And a <a href="mailto:[email protected]">mailto:[email protected]</a> | ||
// And a <a href="mailto:[email protected]">[email protected]</a> | ||
// And a plain <a href="http://www.google.com">www.google.com</a></p> | ||
|
||
Console.WriteLine("Example {0}" + Environment.NewLine + "Section: {0}" + Environment.NewLine, 1, "Extensions AutoLinks"); | ||
TestParser.TestSpec("This is a http://www.google.com URL and https://www.google.com\nThis is a ftp://test.com\nAnd a mailto:[email protected]\nAnd a plain www.google.com", "<p>This is a <a href=\"http://www.google.com\">http://www.google.com</a> URL and <a href=\"https://www.google.com\">https://www.google.com</a>\nThis is a <a href=\"ftp://test.com\">ftp://test.com</a>\nAnd a <a href=\"mailto:[email protected]\">mailto:[email protected]</a>\nAnd a plain <a href=\"http://www.google.com\">www.google.com</a></p>", "autolinks|advanced"); | ||
TestParser.TestSpec("This is a http://www.google.com URL and https://www.google.com\nThis is a ftp://test.com\nAnd a mailto:[email protected]\nAnd a plain www.google.com", "<p>This is a <a href=\"http://www.google.com\">http://www.google.com</a> URL and <a href=\"https://www.google.com\">https://www.google.com</a>\nThis is a <a href=\"ftp://test.com\">ftp://test.com</a>\nAnd a <a href=\"mailto:[email protected]\">[email protected]</a>\nAnd a plain <a href=\"http://www.google.com\">www.google.com</a></p>", "autolinks|advanced"); | ||
} | ||
} | ||
// But incomplete links will not be matched: | ||
|
@@ -20939,7 +20939,7 @@ public void ExtensionsAutoLinks_Example007() | |
public partial class TestExtensionsAutoLinksGFMSupport | ||
{ | ||
[Test] | ||
public void Example008() | ||
public void ExtensionsAutoLinksGFMSupport_Example008() | ||
{ | ||
// Example 8 | ||
// Section: Extensions AutoLinks GFM Support | ||
|
@@ -20958,7 +20958,7 @@ public void Example008() | |
public partial class TestExtensionsAutoLinksGFMSupport | ||
{ | ||
[Test] | ||
public void Example009() | ||
public void ExtensionsAutoLinksGFMSupport_Example009() | ||
{ | ||
// Example 9 | ||
// Section: Extensions AutoLinks GFM Support | ||
|
@@ -20977,7 +20977,7 @@ public void Example009() | |
public partial class TestExtensionsAutoLinksGFMSupport | ||
{ | ||
[Test] | ||
public void Example010() | ||
public void ExtensionsAutoLinksGFMSupport_Example010() | ||
{ | ||
// Example 10 | ||
// Section: Extensions AutoLinks GFM Support | ||
|
@@ -20999,7 +20999,7 @@ public void Example010() | |
public partial class TestExtensionsAutoLinksGFMSupport | ||
{ | ||
[Test] | ||
public void Example011() | ||
public void ExtensionsAutoLinksGFMSupport_Example011() | ||
{ | ||
// Example 11 | ||
// Section: Extensions AutoLinks GFM Support | ||
|
@@ -21021,7 +21021,7 @@ public void Example011() | |
public partial class TestExtensionsAutoLinksGFMSupport | ||
{ | ||
[Test] | ||
public void Example012() | ||
public void ExtensionsAutoLinksGFMSupport_Example012() | ||
{ | ||
// Example 12 | ||
// Section: Extensions AutoLinks GFM Support | ||
|
@@ -21043,7 +21043,7 @@ public void Example012() | |
public partial class TestExtensionsAutoLinksGFMSupport | ||
{ | ||
[Test] | ||
public void Example013() | ||
public void ExtensionsAutoLinksGFMSupport_Example013() | ||
{ | ||
// Example 13 | ||
// Section: Extensions AutoLinks GFM Support | ||
|
@@ -21062,7 +21062,7 @@ public void Example013() | |
public partial class TestExtensionsAutoLinksGFMSupport | ||
{ | ||
[Test] | ||
public void Example014() | ||
public void ExtensionsAutoLinksGFMSupport_Example014() | ||
{ | ||
// Example 14 | ||
// Section: Extensions AutoLinks GFM Support | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -426,7 +426,7 @@ public void AutoLinks() | |
AssertNormalizeNoTrim("Hello from http://example.com/foo", "Hello from [http://example.com/foo](http://example.com/foo)", new NormalizeOptions() { ExpandAutoLinks = true, }); | ||
AssertNormalizeNoTrim("Hello from www.example.com/foo", "Hello from [www.example.com/foo](http://www.example.com/foo)", new NormalizeOptions() { ExpandAutoLinks = true, }); | ||
AssertNormalizeNoTrim("Hello from ftp://example.com", "Hello from [ftp://example.com](ftp://example.com)", new NormalizeOptions() { ExpandAutoLinks = true, }); | ||
AssertNormalizeNoTrim("Hello from mailto:[email protected]", "Hello from [mailto:[email protected]](mailto:[email protected])", new NormalizeOptions() { ExpandAutoLinks = true, }); | ||
AssertNormalizeNoTrim("Hello from mailto:[email protected]", "Hello from [[email protected]](mailto:[email protected])", new NormalizeOptions() { ExpandAutoLinks = true, }); | ||
|
||
AssertNormalizeNoTrim("Hello from http://example.com/foo", "Hello from http://example.com/foo", new NormalizeOptions() { ExpandAutoLinks = false, }); | ||
AssertNormalizeNoTrim("Hello from www.example.com/foo", "Hello from http://www.example.com/foo", new NormalizeOptions() { ExpandAutoLinks = false, }); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters