From ba4e463517fdfce994fdf49b3817a89fcc69a135 Mon Sep 17 00:00:00 2001 From: Chris Rodgers Date: Mon, 19 Dec 2016 13:25:56 +0000 Subject: [PATCH] Adds the test I ought to have included to begin with. --- src/Markdig.Tests/Specs/AbbreviationSpecs.md | 10 +++++++++ src/Markdig.Tests/Specs/Specs.cs | 22 ++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/Markdig.Tests/Specs/AbbreviationSpecs.md b/src/Markdig.Tests/Specs/AbbreviationSpecs.md index f65224da..55b4e37d 100644 --- a/src/Markdig.Tests/Specs/AbbreviationSpecs.md +++ b/src/Markdig.Tests/Specs/AbbreviationSpecs.md @@ -67,3 +67,13 @@ We should not abbreviate 1.1A or 11A! .

We should not abbreviate 1.1A or 11A!

```````````````````````````````` + +Abbreviations should match whole word only, even if the word is the entire content: + +```````````````````````````````` example +*[1A]: First + +1.1A +. +

1.1A

+```````````````````````````````` diff --git a/src/Markdig.Tests/Specs/Specs.cs b/src/Markdig.Tests/Specs/Specs.cs index 826255a5..fc337d24 100644 --- a/src/Markdig.Tests/Specs/Specs.cs +++ b/src/Markdig.Tests/Specs/Specs.cs @@ -18671,6 +18671,28 @@ namespace Markdig.Tests Console.WriteLine("Example {0}" + Environment.NewLine + "Section: {0}" + Environment.NewLine, 6, "Extensions Abbreviation"); TestParser.TestSpec("*[1A]: First\n\nWe should not abbreviate 1.1A or 11A!", "

We should not abbreviate 1.1A or 11A!

", "abbreviations|advanced"); } + } + // Abbreviations should match whole word only, even if the word is the entire content: + [TestFixture] + public partial class TestExtensionsAbbreviation + { + [Test] + public void Example007() + { + // Example 7 + // Section: Extensions Abbreviation + // + // The following CommonMark: + // *[1A]: First + // + // 1.1A + // + // Should be rendered as: + //

1.1A

+ + Console.WriteLine("Example {0}" + Environment.NewLine + "Section: {0}" + Environment.NewLine, 7, "Extensions Abbreviation"); + TestParser.TestSpec("*[1A]: First\n\n1.1A", "

1.1A

", "abbreviations|advanced"); + } } // # Extensions //