From 023d93c091070e4e215c81158c22a2ec12ae1ce2 Mon Sep 17 00:00:00 2001
From: Miha Zupan
Date: Mon, 14 Apr 2025 23:32:22 +0200
Subject: [PATCH] Update CommonMark spec to 0.31.2
---
.../Specs/CommonMark.generated.cs | 2254 +++++++++--------
src/Markdig.Tests/Specs/CommonMark.md | 153 +-
2 files changed, 1207 insertions(+), 1200 deletions(-)
diff --git a/src/Markdig.Tests/Specs/CommonMark.generated.cs b/src/Markdig.Tests/Specs/CommonMark.generated.cs
index 3644a5b6..9011894c 100644
--- a/src/Markdig.Tests/Specs/CommonMark.generated.cs
+++ b/src/Markdig.Tests/Specs/CommonMark.generated.cs
@@ -14,9 +14,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// ---
// title: CommonMark Spec
// author: John MacFarlane
- // version: '0.30'
- // date: '2021-06-19'
- // license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)'
+ // version: '0.31.2'
+ // date: '2024-01-28'
+ // license: '[CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)'
// ...
//
// # Introduction
@@ -27,7 +27,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// based on conventions for indicating formatting in email
// and usenet posts. It was developed by John Gruber (with
// help from Aaron Swartz) and released in 2004 in the form of a
- // [syntax description](http://daringfireball.net/projects/markdown/syntax)
+ // [syntax description](https://daringfireball.net/projects/markdown/syntax)
// and a Perl script (`Markdown.pl`) for converting Markdown to
// HTML. In the next decade, dozens of implementations were
// developed in many languages. Some extended the original
@@ -47,10 +47,10 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// > Markdown-formatted document should be publishable as-is, as
// > plain text, without looking like it's been marked up with tags
// > or formatting instructions.
- // > ()
+ // > ()
//
// The point can be illustrated by comparing a sample of
- // [AsciiDoc](http://www.methods.co.nz/asciidoc/) with
+ // [AsciiDoc](https://asciidoc.org/) with
// an equivalent sample of Markdown. Here is a sample of
// AsciiDoc from the AsciiDoc manual:
//
@@ -116,7 +116,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// ## Why is a spec needed?
//
// John Gruber's [canonical description of Markdown's
- // syntax](http://daringfireball.net/projects/markdown/syntax)
+ // syntax](https://daringfireball.net/projects/markdown/syntax)
// does not specify the syntax unambiguously. Here are some examples of
// questions it does not answer:
//
@@ -329,9 +329,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
//
// The following definitions of character classes will be used in this spec:
//
- // A [Unicode whitespace character](@) is
- // any code point in the Unicode `Zs` general category, or a tab (`U+0009`),
- // line feed (`U+000A`), form feed (`U+000C`), or carriage return (`U+000D`).
+ // A [Unicode whitespace character](@) is a character in the Unicode `Zs` general
+ // category, or a tab (`U+0009`), line feed (`U+000A`), form feed (`U+000C`), or
+ // carriage return (`U+000D`).
//
// [Unicode whitespace](@) is a sequence of one or more
// [Unicode whitespace characters].
@@ -350,9 +350,8 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// `[`, `\`, `]`, `^`, `_`, `` ` `` (U+005B–0060),
// `{`, `|`, `}`, or `~` (U+007B–007E).
//
- // A [Unicode punctuation character](@) is an [ASCII
- // punctuation character] or anything in
- // the general Unicode categories `Pc`, `Pd`, `Pe`, `Pf`, `Pi`, `Po`, or `Ps`.
+ // A [Unicode punctuation character](@) is a character in the Unicode `P`
+ // (puncuation) or `S` (symbol) general categories.
//
// ## Tabs
//
@@ -754,12 +753,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Preliminaries / Backslash escapes
//
// The following Markdown:
- //
+ //
//
// Should be rendered as:
- // http://example.com?find=\*
+ // https://example.com?find=\*
- TestParser.TestSpec("", "http://example.com?find=\\*
", "", context: "Example 20\nSection Preliminaries / Backslash escapes\n");
+ TestParser.TestSpec("", "https://example.com?find=\\*
", "", context: "Example 20\nSection Preliminaries / Backslash escapes\n");
}
[Test]
@@ -2879,7 +2878,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// opening code fence until the end of the containing block (or
// document). (An alternative spec would require backtracking in the
// event that a closing code fence is not found. But this makes parsing
- // much less efficient, and there seems to be no real down side to the
+ // much less efficient, and there seems to be no real downside to the
// behavior described here.)
//
// A fenced code block may interrupt a paragraph, and does not require
@@ -3535,7 +3534,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `head`, `header`, `hr`,
// `html`, `iframe`, `legend`, `li`, `link`, `main`, `menu`, `menuitem`,
// `nav`, `noframes`, `ol`, `optgroup`, `option`, `p`, `param`,
- // `section`, `source`, `summary`, `table`, `tbody`, `td`,
+ // `search`, `section`, `summary`, `table`, `tbody`, `td`,
// `tfoot`, `th`, `thead`, `title`, `tr`, `track`, `ul`, followed
// by a space, a tab, the end of the line, the string `>`, or
// the string `/>`.\
@@ -6028,7 +6027,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// blocks *Bs* starting with a character other than a space or tab, and *M* is
// a list marker of width *W* followed by 1 ≤ *N* ≤ 4 spaces of indentation,
// then the result of prepending *M* and the following spaces to the first line
- // of Ls*, and indenting subsequent lines of *Ls* by *W + N* spaces, is a
+ // of *Ls*, and indenting subsequent lines of *Ls* by *W + N* spaces, is a
// list item with *Bs* as its contents. The type of the list item
// (bullet or ordered) is determined by the type of its list marker.
// If the list item is ordered, then it is also assigned a start
@@ -7635,11 +7634,11 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Since it is well established Markdown practice to allow lists to
// interrupt paragraphs inside list items, the [principle of
// uniformity] requires us to allow this outside list items as
- // well. ([reStructuredText](http://docutils.sourceforge.net/rst.html)
+ // well. ([reStructuredText](https://docutils.sourceforge.net/rst.html)
// takes a different approach, requiring blank lines before lists
// even inside other list items.)
//
- // In order to solve of unwanted lists in paragraphs with
+ // In order to solve the problem of unwanted lists in paragraphs with
// hard-wrapped numerals, we allow only lists starting with `1` to
// interrupt paragraphs. Thus,
[Test]
@@ -8661,12 +8660,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Code spans
//
// The following Markdown:
- // ``
+ // ``
//
// Should be rendered as:
- // <http://foo.bar.baz>`
+ // <https://foo.bar.baz>`
- TestParser.TestSpec("``", "<http://foo.bar.baz>`
", "", context: "Example 345\nSection Inlines / Code spans\n");
+ TestParser.TestSpec("``", "<https://foo.bar.baz>`
", "", context: "Example 345\nSection Inlines / Code spans\n");
}
// But this is an autolink:
@@ -8677,12 +8676,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Code spans
//
// The following Markdown:
- // `
+ // `
//
// Should be rendered as:
- // http://foo.bar.`baz`
+ // https://foo.bar.`baz`
- TestParser.TestSpec("`", "http://foo.bar.`baz`
", "", context: "Example 346\nSection Inlines / Code spans\n");
+ TestParser.TestSpec("`", "https://foo.bar.`baz`
", "", context: "Example 346\nSection Inlines / Code spans\n");
}
// When a backtick string is not closed by a matching backtick string,
@@ -8741,7 +8740,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// ## Emphasis and strong emphasis
//
// John Gruber's original [Markdown syntax
- // description](http://daringfireball.net/projects/markdown/syntax#em) says:
+ // description](https://daringfireball.net/projects/markdown/syntax#em) says:
//
// > Markdown treats asterisks (`*`) and underscores (`_`) as indicators of
// > emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML
@@ -8843,7 +8842,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// (The idea of distinguishing left-flanking and right-flanking
// delimiter runs based on the character before and the character
// after comes from Roopesh Chander's
- // [vfmd](http://www.vfmd.org/vfmd-spec/specification/#procedure-for-identifying-emphasis-tags).
+ // [vfmd](https://web.archive.org/web/20220608143320/http://www.vfmd.org/vfmd-spec/specification/#procedure-for-identifying-emphasis-tags).
// vfmd uses the terminology "emphasis indicator string" instead of "delimiter
// run," and its rules for distinguishing left- and right-flanking runs
// are a bit more complex than the ones given here.)
@@ -9013,7 +9012,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
TestParser.TestSpec("* a *", "* a *
", "", context: "Example 353\nSection Inlines / Emphasis and strong emphasis\n");
}
- // Intraword emphasis with `*` is permitted:
+ // Unicode symbols count as punctuation, too:
[Test]
public void InlinesEmphasisAndStrongEmphasis_Example354()
{
@@ -9021,18 +9020,40 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // *$*alpha.
+ //
+ // *£*bravo.
+ //
+ // *€*charlie.
+ //
+ // Should be rendered as:
+ // *$*alpha.
+ // *£*bravo.
+ // *€*charlie.
+
+ TestParser.TestSpec("*$*alpha.\n\n*£*bravo.\n\n*€*charlie.", "*$*alpha.
\n*£*bravo.
\n*€*charlie.
", "", context: "Example 354\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ // Intraword emphasis with `*` is permitted:
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example355()
+ {
+ // Example 355
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// foo*bar*
//
// Should be rendered as:
// foobar
- TestParser.TestSpec("foo*bar*", "foobar
", "", context: "Example 354\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo*bar*", "foobar
", "", context: "Example 355\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example355()
+ public void InlinesEmphasisAndStrongEmphasis_Example356()
{
- // Example 355
+ // Example 356
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9041,14 +9062,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 5678
- TestParser.TestSpec("5*6*78", "5678
", "", context: "Example 355\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("5*6*78", "5678
", "", context: "Example 356\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 2:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example356()
+ public void InlinesEmphasisAndStrongEmphasis_Example357()
{
- // Example 356
+ // Example 357
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9057,15 +9078,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar
- TestParser.TestSpec("_foo bar_", "foo bar
", "", context: "Example 356\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_foo bar_", "foo bar
", "", context: "Example 357\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is not emphasis, because the opening `_` is followed by
// whitespace:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example357()
+ public void InlinesEmphasisAndStrongEmphasis_Example358()
{
- // Example 357
+ // Example 358
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9074,15 +9095,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// _ foo bar_
- TestParser.TestSpec("_ foo bar_", "_ foo bar_
", "", context: "Example 357\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_ foo bar_", "_ foo bar_
", "", context: "Example 358\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is not emphasis, because the opening `_` is preceded
// by an alphanumeric and followed by punctuation:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example358()
+ public void InlinesEmphasisAndStrongEmphasis_Example359()
{
- // Example 358
+ // Example 359
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9091,14 +9112,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// a_"foo"_
- TestParser.TestSpec("a_\"foo\"_", "a_"foo"_
", "", context: "Example 358\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("a_\"foo\"_", "a_"foo"_
", "", context: "Example 359\nSection Inlines / Emphasis and strong emphasis\n");
}
// Emphasis with `_` is not allowed inside words:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example359()
+ public void InlinesEmphasisAndStrongEmphasis_Example360()
{
- // Example 359
+ // Example 360
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9107,22 +9128,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo_bar_
- TestParser.TestSpec("foo_bar_", "foo_bar_
", "", context: "Example 359\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example360()
- {
- // Example 360
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // 5_6_78
- //
- // Should be rendered as:
- // 5_6_78
-
- TestParser.TestSpec("5_6_78", "5_6_78
", "", context: "Example 360\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo_bar_", "foo_bar_
", "", context: "Example 360\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -9132,20 +9138,35 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // 5_6_78
+ //
+ // Should be rendered as:
+ // 5_6_78
+
+ TestParser.TestSpec("5_6_78", "5_6_78
", "", context: "Example 361\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example362()
+ {
+ // Example 362
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// пристаням_стремятся_
//
// Should be rendered as:
// пристаням_стремятся_
- TestParser.TestSpec("пристаням_стремятся_", "пристаням_стремятся_
", "", context: "Example 361\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("пристаням_стремятся_", "пристаням_стремятся_
", "", context: "Example 362\nSection Inlines / Emphasis and strong emphasis\n");
}
// Here `_` does not generate emphasis, because the first delimiter run
// is right-flanking and the second left-flanking:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example362()
+ public void InlinesEmphasisAndStrongEmphasis_Example363()
{
- // Example 362
+ // Example 363
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9154,16 +9175,16 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// aa_"bb"_cc
- TestParser.TestSpec("aa_\"bb\"_cc", "aa_"bb"_cc
", "", context: "Example 362\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("aa_\"bb\"_cc", "aa_"bb"_cc
", "", context: "Example 363\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is emphasis, even though the opening delimiter is
// both left- and right-flanking, because it is preceded by
// punctuation:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example363()
+ public void InlinesEmphasisAndStrongEmphasis_Example364()
{
- // Example 363
+ // Example 364
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9172,7 +9193,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo-(bar)
- TestParser.TestSpec("foo-_(bar)_", "foo-(bar)
", "", context: "Example 363\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo-_(bar)_", "foo-(bar)
", "", context: "Example 364\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 3:
@@ -9180,9 +9201,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// This is not emphasis, because the closing delimiter does
// not match the opening delimiter:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example364()
+ public void InlinesEmphasisAndStrongEmphasis_Example365()
{
- // Example 364
+ // Example 365
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9191,15 +9212,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// _foo*
- TestParser.TestSpec("_foo*", "_foo*
", "", context: "Example 364\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_foo*", "_foo*
", "", context: "Example 365\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is not emphasis, because the closing `*` is preceded by
// whitespace:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example365()
+ public void InlinesEmphasisAndStrongEmphasis_Example366()
{
- // Example 365
+ // Example 366
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9208,14 +9229,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// *foo bar *
- TestParser.TestSpec("*foo bar *", "*foo bar *
", "", context: "Example 365\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo bar *", "*foo bar *
", "", context: "Example 366\nSection Inlines / Emphasis and strong emphasis\n");
}
// A line ending also counts as whitespace:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example366()
+ public void InlinesEmphasisAndStrongEmphasis_Example367()
{
- // Example 366
+ // Example 367
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9226,16 +9247,16 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// *foo bar
// *
- TestParser.TestSpec("*foo bar\n*", "*foo bar\n*
", "", context: "Example 366\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo bar\n*", "*foo bar\n*
", "", context: "Example 367\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is not emphasis, because the second `*` is
// preceded by punctuation and followed by an alphanumeric
// (hence it is not part of a [right-flanking delimiter run]:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example367()
+ public void InlinesEmphasisAndStrongEmphasis_Example368()
{
- // Example 367
+ // Example 368
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9244,15 +9265,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// *(*foo)
- TestParser.TestSpec("*(*foo)", "*(*foo)
", "", context: "Example 367\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*(*foo)", "*(*foo)
", "", context: "Example 368\nSection Inlines / Emphasis and strong emphasis\n");
}
// The point of this restriction is more easily appreciated
// with this example:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example368()
+ public void InlinesEmphasisAndStrongEmphasis_Example369()
{
- // Example 368
+ // Example 369
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9261,14 +9282,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// (foo)
- TestParser.TestSpec("*(*foo*)*", "(foo)
", "", context: "Example 368\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*(*foo*)*", "(foo)
", "", context: "Example 369\nSection Inlines / Emphasis and strong emphasis\n");
}
// Intraword emphasis with `*` is allowed:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example369()
+ public void InlinesEmphasisAndStrongEmphasis_Example370()
{
- // Example 369
+ // Example 370
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9277,7 +9298,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foobar
- TestParser.TestSpec("*foo*bar", "foobar
", "", context: "Example 369\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo*bar", "foobar
", "", context: "Example 370\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 4:
@@ -9285,9 +9306,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// This is not emphasis, because the closing `_` is preceded by
// whitespace:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example370()
+ public void InlinesEmphasisAndStrongEmphasis_Example371()
{
- // Example 370
+ // Example 371
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9296,15 +9317,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// _foo bar _
- TestParser.TestSpec("_foo bar _", "_foo bar _
", "", context: "Example 370\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_foo bar _", "_foo bar _
", "", context: "Example 371\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is not emphasis, because the second `_` is
// preceded by punctuation and followed by an alphanumeric:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example371()
+ public void InlinesEmphasisAndStrongEmphasis_Example372()
{
- // Example 371
+ // Example 372
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9313,14 +9334,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// _(_foo)
- TestParser.TestSpec("_(_foo)", "_(_foo)
", "", context: "Example 371\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_(_foo)", "_(_foo)
", "", context: "Example 372\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is emphasis within emphasis:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example372()
+ public void InlinesEmphasisAndStrongEmphasis_Example373()
{
- // Example 372
+ // Example 373
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9329,14 +9350,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// (foo)
- TestParser.TestSpec("_(_foo_)_", "(foo)
", "", context: "Example 372\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_(_foo_)_", "(foo)
", "", context: "Example 373\nSection Inlines / Emphasis and strong emphasis\n");
}
// Intraword emphasis is disallowed for `_`:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example373()
+ public void InlinesEmphasisAndStrongEmphasis_Example374()
{
- // Example 373
+ // Example 374
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9345,22 +9366,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// _foo_bar
- TestParser.TestSpec("_foo_bar", "_foo_bar
", "", context: "Example 373\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example374()
- {
- // Example 374
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // _пристаням_стремятся
- //
- // Should be rendered as:
- // _пристаням_стремятся
-
- TestParser.TestSpec("_пристаням_стремятся", "_пристаням_стремятся
", "", context: "Example 374\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_foo_bar", "_foo_bar
", "", context: "Example 374\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -9370,21 +9376,36 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // _пристаням_стремятся
+ //
+ // Should be rendered as:
+ // _пристаням_стремятся
+
+ TestParser.TestSpec("_пристаням_стремятся", "_пристаням_стремятся
", "", context: "Example 375\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example376()
+ {
+ // Example 376
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// _foo_bar_baz_
//
// Should be rendered as:
// foo_bar_baz
- TestParser.TestSpec("_foo_bar_baz_", "foo_bar_baz
", "", context: "Example 375\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_foo_bar_baz_", "foo_bar_baz
", "", context: "Example 376\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is emphasis, even though the closing delimiter is
// both left- and right-flanking, because it is followed by
// punctuation:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example376()
+ public void InlinesEmphasisAndStrongEmphasis_Example377()
{
- // Example 376
+ // Example 377
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9393,14 +9414,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// (bar).
- TestParser.TestSpec("_(bar)_.", "(bar).
", "", context: "Example 376\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_(bar)_.", "(bar).
", "", context: "Example 377\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 5:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example377()
+ public void InlinesEmphasisAndStrongEmphasis_Example378()
{
- // Example 377
+ // Example 378
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9409,15 +9430,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar
- TestParser.TestSpec("**foo bar**", "foo bar
", "", context: "Example 377\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo bar**", "foo bar
", "", context: "Example 378\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is not strong emphasis, because the opening delimiter is
// followed by whitespace:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example378()
+ public void InlinesEmphasisAndStrongEmphasis_Example379()
{
- // Example 378
+ // Example 379
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9426,16 +9447,16 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// ** foo bar**
- TestParser.TestSpec("** foo bar**", "** foo bar**
", "", context: "Example 378\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("** foo bar**", "** foo bar**
", "", context: "Example 379\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is not strong emphasis, because the opening `**` is preceded
// by an alphanumeric and followed by punctuation, and hence
// not part of a [left-flanking delimiter run]:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example379()
+ public void InlinesEmphasisAndStrongEmphasis_Example380()
{
- // Example 379
+ // Example 380
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9444,14 +9465,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// a**"foo"**
- TestParser.TestSpec("a**\"foo\"**", "a**"foo"**
", "", context: "Example 379\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("a**\"foo\"**", "a**"foo"**
", "", context: "Example 380\nSection Inlines / Emphasis and strong emphasis\n");
}
// Intraword strong emphasis with `**` is permitted:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example380()
+ public void InlinesEmphasisAndStrongEmphasis_Example381()
{
- // Example 380
+ // Example 381
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9460,14 +9481,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foobar
- TestParser.TestSpec("foo**bar**", "foobar
", "", context: "Example 380\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo**bar**", "foobar
", "", context: "Example 381\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 6:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example381()
+ public void InlinesEmphasisAndStrongEmphasis_Example382()
{
- // Example 381
+ // Example 382
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9476,15 +9497,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar
- TestParser.TestSpec("__foo bar__", "foo bar
", "", context: "Example 381\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__foo bar__", "foo bar
", "", context: "Example 382\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is not strong emphasis, because the opening delimiter is
// followed by whitespace:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example382()
+ public void InlinesEmphasisAndStrongEmphasis_Example383()
{
- // Example 382
+ // Example 383
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9493,14 +9514,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// __ foo bar__
- TestParser.TestSpec("__ foo bar__", "__ foo bar__
", "", context: "Example 382\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__ foo bar__", "__ foo bar__
", "", context: "Example 383\nSection Inlines / Emphasis and strong emphasis\n");
}
// A line ending counts as whitespace:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example383()
+ public void InlinesEmphasisAndStrongEmphasis_Example384()
{
- // Example 383
+ // Example 384
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9511,15 +9532,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// __
// foo bar__
- TestParser.TestSpec("__\nfoo bar__", "__\nfoo bar__
", "", context: "Example 383\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__\nfoo bar__", "__\nfoo bar__
", "", context: "Example 384\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is not strong emphasis, because the opening `__` is preceded
// by an alphanumeric and followed by punctuation:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example384()
+ public void InlinesEmphasisAndStrongEmphasis_Example385()
{
- // Example 384
+ // Example 385
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9528,14 +9549,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// a__"foo"__
- TestParser.TestSpec("a__\"foo\"__", "a__"foo"__
", "", context: "Example 384\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("a__\"foo\"__", "a__"foo"__
", "", context: "Example 385\nSection Inlines / Emphasis and strong emphasis\n");
}
// Intraword strong emphasis is forbidden with `__`:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example385()
+ public void InlinesEmphasisAndStrongEmphasis_Example386()
{
- // Example 385
+ // Example 386
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9544,22 +9565,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo__bar__
- TestParser.TestSpec("foo__bar__", "foo__bar__
", "", context: "Example 385\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example386()
- {
- // Example 386
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // 5__6__78
- //
- // Should be rendered as:
- // 5__6__78
-
- TestParser.TestSpec("5__6__78", "5__6__78
", "", context: "Example 386\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo__bar__", "foo__bar__
", "", context: "Example 386\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -9569,12 +9575,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // пристаням__стремятся__
+ // 5__6__78
//
// Should be rendered as:
- // пристаням__стремятся__
+ // 5__6__78
- TestParser.TestSpec("пристаням__стремятся__", "пристаням__стремятся__
", "", context: "Example 387\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("5__6__78", "5__6__78
", "", context: "Example 387\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -9584,21 +9590,36 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // пристаням__стремятся__
+ //
+ // Should be rendered as:
+ // пристаням__стремятся__
+
+ TestParser.TestSpec("пристаням__стремятся__", "пристаням__стремятся__
", "", context: "Example 388\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example389()
+ {
+ // Example 389
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// __foo, __bar__, baz__
//
// Should be rendered as:
// foo, bar, baz
- TestParser.TestSpec("__foo, __bar__, baz__", "foo, bar, baz
", "", context: "Example 388\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__foo, __bar__, baz__", "foo, bar, baz
", "", context: "Example 389\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is strong emphasis, even though the opening delimiter is
// both left- and right-flanking, because it is preceded by
// punctuation:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example389()
+ public void InlinesEmphasisAndStrongEmphasis_Example390()
{
- // Example 389
+ // Example 390
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9607,7 +9628,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo-(bar)
- TestParser.TestSpec("foo-__(bar)__", "foo-(bar)
", "", context: "Example 389\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo-__(bar)__", "foo-(bar)
", "", context: "Example 390\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 7:
@@ -9615,9 +9636,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// This is not strong emphasis, because the closing delimiter is preceded
// by whitespace:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example390()
+ public void InlinesEmphasisAndStrongEmphasis_Example391()
{
- // Example 390
+ // Example 391
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9626,7 +9647,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// **foo bar **
- TestParser.TestSpec("**foo bar **", "**foo bar **
", "", context: "Example 390\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo bar **", "**foo bar **
", "", context: "Example 391\nSection Inlines / Emphasis and strong emphasis\n");
}
// (Nor can it be interpreted as an emphasized `*foo bar *`, because of
@@ -9635,9 +9656,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// This is not strong emphasis, because the second `**` is
// preceded by punctuation and followed by an alphanumeric:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example391()
+ public void InlinesEmphasisAndStrongEmphasis_Example392()
{
- // Example 391
+ // Example 392
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9646,15 +9667,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// **(**foo)
- TestParser.TestSpec("**(**foo)", "**(**foo)
", "", context: "Example 391\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**(**foo)", "**(**foo)
", "", context: "Example 392\nSection Inlines / Emphasis and strong emphasis\n");
}
// The point of this restriction is more easily appreciated
// with these examples:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example392()
+ public void InlinesEmphasisAndStrongEmphasis_Example393()
{
- // Example 392
+ // Example 393
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9663,13 +9684,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// (foo)
- TestParser.TestSpec("*(**foo**)*", "(foo)
", "", context: "Example 392\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*(**foo**)*", "(foo)
", "", context: "Example 393\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example393()
+ public void InlinesEmphasisAndStrongEmphasis_Example394()
{
- // Example 393
+ // Example 394
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9680,13 +9701,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Gomphocarpus (Gomphocarpus physocarpus, syn.
// Asclepias physocarpa)
- TestParser.TestSpec("**Gomphocarpus (*Gomphocarpus physocarpus*, syn.\n*Asclepias physocarpa*)**", "Gomphocarpus (Gomphocarpus physocarpus, syn.\nAsclepias physocarpa)
", "", context: "Example 393\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**Gomphocarpus (*Gomphocarpus physocarpus*, syn.\n*Asclepias physocarpa*)**", "Gomphocarpus (Gomphocarpus physocarpus, syn.\nAsclepias physocarpa)
", "", context: "Example 394\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example394()
+ public void InlinesEmphasisAndStrongEmphasis_Example395()
{
- // Example 394
+ // Example 395
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9695,14 +9716,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo "bar" foo
- TestParser.TestSpec("**foo \"*bar*\" foo**", "foo "bar" foo
", "", context: "Example 394\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo \"*bar*\" foo**", "foo "bar" foo
", "", context: "Example 395\nSection Inlines / Emphasis and strong emphasis\n");
}
// Intraword emphasis:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example395()
+ public void InlinesEmphasisAndStrongEmphasis_Example396()
{
- // Example 395
+ // Example 396
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9711,7 +9732,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foobar
- TestParser.TestSpec("**foo**bar", "foobar
", "", context: "Example 395\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo**bar", "foobar
", "", context: "Example 396\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 8:
@@ -9719,9 +9740,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// This is not strong emphasis, because the closing delimiter is
// preceded by whitespace:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example396()
+ public void InlinesEmphasisAndStrongEmphasis_Example397()
{
- // Example 396
+ // Example 397
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9730,15 +9751,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// __foo bar __
- TestParser.TestSpec("__foo bar __", "__foo bar __
", "", context: "Example 396\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__foo bar __", "__foo bar __
", "", context: "Example 397\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is not strong emphasis, because the second `__` is
// preceded by punctuation and followed by an alphanumeric:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example397()
+ public void InlinesEmphasisAndStrongEmphasis_Example398()
{
- // Example 397
+ // Example 398
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9747,15 +9768,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// __(__foo)
- TestParser.TestSpec("__(__foo)", "__(__foo)
", "", context: "Example 397\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__(__foo)", "__(__foo)
", "", context: "Example 398\nSection Inlines / Emphasis and strong emphasis\n");
}
// The point of this restriction is more easily appreciated
// with this example:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example398()
+ public void InlinesEmphasisAndStrongEmphasis_Example399()
{
- // Example 398
+ // Example 399
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9764,14 +9785,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// (foo)
- TestParser.TestSpec("_(__foo__)_", "(foo)
", "", context: "Example 398\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_(__foo__)_", "(foo)
", "", context: "Example 399\nSection Inlines / Emphasis and strong emphasis\n");
}
// Intraword strong emphasis is forbidden with `__`:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example399()
+ public void InlinesEmphasisAndStrongEmphasis_Example400()
{
- // Example 399
+ // Example 400
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9780,22 +9801,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// __foo__bar
- TestParser.TestSpec("__foo__bar", "__foo__bar
", "", context: "Example 399\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example400()
- {
- // Example 400
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // __пристаням__стремятся
- //
- // Should be rendered as:
- // __пристаням__стремятся
-
- TestParser.TestSpec("__пристаням__стремятся", "__пристаням__стремятся
", "", context: "Example 400\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__foo__bar", "__foo__bar
", "", context: "Example 400\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -9805,21 +9811,36 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // __пристаням__стремятся
+ //
+ // Should be rendered as:
+ // __пристаням__стремятся
+
+ TestParser.TestSpec("__пристаням__стремятся", "__пристаням__стремятся
", "", context: "Example 401\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example402()
+ {
+ // Example 402
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// __foo__bar__baz__
//
// Should be rendered as:
// foo__bar__baz
- TestParser.TestSpec("__foo__bar__baz__", "foo__bar__baz
", "", context: "Example 401\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__foo__bar__baz__", "foo__bar__baz
", "", context: "Example 402\nSection Inlines / Emphasis and strong emphasis\n");
}
// This is strong emphasis, even though the closing delimiter is
// both left- and right-flanking, because it is followed by
// punctuation:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example402()
+ public void InlinesEmphasisAndStrongEmphasis_Example403()
{
- // Example 402
+ // Example 403
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9828,7 +9849,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// (bar).
- TestParser.TestSpec("__(bar)__.", "(bar).
", "", context: "Example 402\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__(bar)__.", "(bar).
", "", context: "Example 403\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 9:
@@ -9836,9 +9857,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Any nonempty sequence of inline elements can be the contents of an
// emphasized span.
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example403()
+ public void InlinesEmphasisAndStrongEmphasis_Example404()
{
- // Example 403
+ // Example 404
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9847,13 +9868,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar
- TestParser.TestSpec("*foo [bar](/url)*", "foo bar
", "", context: "Example 403\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo [bar](/url)*", "foo bar
", "", context: "Example 404\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example404()
+ public void InlinesEmphasisAndStrongEmphasis_Example405()
{
- // Example 404
+ // Example 405
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9864,15 +9885,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// foo
// bar
- TestParser.TestSpec("*foo\nbar*", "foo\nbar
", "", context: "Example 404\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo\nbar*", "foo\nbar
", "", context: "Example 405\nSection Inlines / Emphasis and strong emphasis\n");
}
// In particular, emphasis and strong emphasis can be nested
// inside emphasis:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example405()
+ public void InlinesEmphasisAndStrongEmphasis_Example406()
{
- // Example 405
+ // Example 406
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9881,22 +9902,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar baz
- TestParser.TestSpec("_foo __bar__ baz_", "foo bar baz
", "", context: "Example 405\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example406()
- {
- // Example 406
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // _foo _bar_ baz_
- //
- // Should be rendered as:
- // foo bar baz
-
- TestParser.TestSpec("_foo _bar_ baz_", "foo bar baz
", "", context: "Example 406\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_foo __bar__ baz_", "foo bar baz
", "", context: "Example 406\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -9906,12 +9912,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // __foo_ bar_
+ // _foo _bar_ baz_
//
// Should be rendered as:
- // foo bar
+ // foo bar baz
- TestParser.TestSpec("__foo_ bar_", "foo bar
", "", context: "Example 407\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_foo _bar_ baz_", "foo bar baz
", "", context: "Example 407\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -9921,12 +9927,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // *foo *bar**
+ // __foo_ bar_
//
// Should be rendered as:
- // foo bar
+ // foo bar
- TestParser.TestSpec("*foo *bar**", "foo bar
", "", context: "Example 408\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__foo_ bar_", "foo bar
", "", context: "Example 408\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -9936,12 +9942,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // *foo **bar** baz*
+ // *foo *bar**
//
// Should be rendered as:
- // foo bar baz
+ // foo bar
- TestParser.TestSpec("*foo **bar** baz*", "foo bar baz
", "", context: "Example 409\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo *bar**", "foo bar
", "", context: "Example 409\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -9951,12 +9957,27 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // *foo **bar** baz*
+ //
+ // Should be rendered as:
+ // foo bar baz
+
+ TestParser.TestSpec("*foo **bar** baz*", "foo bar baz
", "", context: "Example 410\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example411()
+ {
+ // Example 411
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// *foo**bar**baz*
//
// Should be rendered as:
// foobarbaz
- TestParser.TestSpec("*foo**bar**baz*", "foobarbaz
", "", context: "Example 410\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo**bar**baz*", "foobarbaz
", "", context: "Example 411\nSection Inlines / Emphasis and strong emphasis\n");
}
// Note that in the preceding case, the interpretation
@@ -9977,9 +9998,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// For the same reason, we don't get two consecutive
// emphasis sections in this example:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example411()
+ public void InlinesEmphasisAndStrongEmphasis_Example412()
{
- // Example 411
+ // Example 412
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -9988,7 +10009,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo**bar
- TestParser.TestSpec("*foo**bar*", "foo**bar
", "", context: "Example 411\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo**bar*", "foo**bar
", "", context: "Example 412\nSection Inlines / Emphasis and strong emphasis\n");
}
// The same condition ensures that the following
@@ -9996,9 +10017,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// emphasis, even when the interior whitespace is
// omitted:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example412()
+ public void InlinesEmphasisAndStrongEmphasis_Example413()
{
- // Example 412
+ // Example 413
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10007,22 +10028,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar
- TestParser.TestSpec("***foo** bar*", "foo bar
", "", context: "Example 412\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example413()
- {
- // Example 413
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // *foo **bar***
- //
- // Should be rendered as:
- // foo bar
-
- TestParser.TestSpec("*foo **bar***", "foo bar
", "", context: "Example 413\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("***foo** bar*", "foo bar
", "", context: "Example 413\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10032,21 +10038,36 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // *foo **bar***
+ //
+ // Should be rendered as:
+ // foo bar
+
+ TestParser.TestSpec("*foo **bar***", "foo bar
", "", context: "Example 414\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example415()
+ {
+ // Example 415
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// *foo**bar***
//
// Should be rendered as:
// foobar
- TestParser.TestSpec("*foo**bar***", "foobar
", "", context: "Example 414\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo**bar***", "foobar
", "", context: "Example 415\nSection Inlines / Emphasis and strong emphasis\n");
}
// When the lengths of the interior closing and opening
// delimiter runs are *both* multiples of 3, though,
// they can match to create emphasis:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example415()
+ public void InlinesEmphasisAndStrongEmphasis_Example416()
{
- // Example 415
+ // Example 416
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10055,13 +10076,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foobarbaz
- TestParser.TestSpec("foo***bar***baz", "foobarbaz
", "", context: "Example 415\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo***bar***baz", "foobarbaz
", "", context: "Example 416\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example416()
+ public void InlinesEmphasisAndStrongEmphasis_Example417()
{
- // Example 416
+ // Example 417
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10070,14 +10091,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foobar***baz
- TestParser.TestSpec("foo******bar*********baz", "foobar***baz
", "", context: "Example 416\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo******bar*********baz", "foobar***baz
", "", context: "Example 417\nSection Inlines / Emphasis and strong emphasis\n");
}
// Indefinite levels of nesting are possible:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example417()
+ public void InlinesEmphasisAndStrongEmphasis_Example418()
{
- // Example 417
+ // Example 418
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10086,13 +10107,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar baz bim bop
- TestParser.TestSpec("*foo **bar *baz* bim** bop*", "foo bar baz bim bop
", "", context: "Example 417\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo **bar *baz* bim** bop*", "foo bar baz bim bop
", "", context: "Example 418\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example418()
+ public void InlinesEmphasisAndStrongEmphasis_Example419()
{
- // Example 418
+ // Example 419
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10101,14 +10122,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar
- TestParser.TestSpec("*foo [*bar*](/url)*", "foo bar
", "", context: "Example 418\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo [*bar*](/url)*", "foo bar
", "", context: "Example 419\nSection Inlines / Emphasis and strong emphasis\n");
}
// There can be no empty emphasis or strong emphasis:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example419()
+ public void InlinesEmphasisAndStrongEmphasis_Example420()
{
- // Example 419
+ // Example 420
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10117,13 +10138,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// ** is not an empty emphasis
- TestParser.TestSpec("** is not an empty emphasis", "** is not an empty emphasis
", "", context: "Example 419\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("** is not an empty emphasis", "** is not an empty emphasis
", "", context: "Example 420\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example420()
+ public void InlinesEmphasisAndStrongEmphasis_Example421()
{
- // Example 420
+ // Example 421
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10132,7 +10153,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// **** is not an empty strong emphasis
- TestParser.TestSpec("**** is not an empty strong emphasis", "**** is not an empty strong emphasis
", "", context: "Example 420\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**** is not an empty strong emphasis", "**** is not an empty strong emphasis
", "", context: "Example 421\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 10:
@@ -10140,9 +10161,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Any nonempty sequence of inline elements can be the contents of an
// strongly emphasized span.
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example421()
+ public void InlinesEmphasisAndStrongEmphasis_Example422()
{
- // Example 421
+ // Example 422
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10151,13 +10172,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar
- TestParser.TestSpec("**foo [bar](/url)**", "foo bar
", "", context: "Example 421\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo [bar](/url)**", "foo bar
", "", context: "Example 422\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example422()
+ public void InlinesEmphasisAndStrongEmphasis_Example423()
{
- // Example 422
+ // Example 423
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10168,15 +10189,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// foo
// bar
- TestParser.TestSpec("**foo\nbar**", "foo\nbar
", "", context: "Example 422\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo\nbar**", "foo\nbar
", "", context: "Example 423\nSection Inlines / Emphasis and strong emphasis\n");
}
// In particular, emphasis and strong emphasis can be nested
// inside strong emphasis:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example423()
+ public void InlinesEmphasisAndStrongEmphasis_Example424()
{
- // Example 423
+ // Example 424
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10185,22 +10206,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar baz
- TestParser.TestSpec("__foo _bar_ baz__", "foo bar baz
", "", context: "Example 423\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example424()
- {
- // Example 424
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // __foo __bar__ baz__
- //
- // Should be rendered as:
- // foo bar baz
-
- TestParser.TestSpec("__foo __bar__ baz__", "foo bar baz
", "", context: "Example 424\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__foo _bar_ baz__", "foo bar baz
", "", context: "Example 424\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10210,12 +10216,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // ____foo__ bar__
+ // __foo __bar__ baz__
//
// Should be rendered as:
- // foo bar
+ // foo bar baz
- TestParser.TestSpec("____foo__ bar__", "foo bar
", "", context: "Example 425\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__foo __bar__ baz__", "foo bar baz
", "", context: "Example 425\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10225,12 +10231,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // **foo **bar****
+ // ____foo__ bar__
//
// Should be rendered as:
- // foo bar
+ // foo bar
- TestParser.TestSpec("**foo **bar****", "foo bar
", "", context: "Example 426\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("____foo__ bar__", "foo bar
", "", context: "Example 426\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10240,12 +10246,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // **foo *bar* baz**
+ // **foo **bar****
//
// Should be rendered as:
- // foo bar baz
+ // foo bar
- TestParser.TestSpec("**foo *bar* baz**", "foo bar baz
", "", context: "Example 427\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo **bar****", "foo bar
", "", context: "Example 427\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10255,12 +10261,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // **foo*bar*baz**
+ // **foo *bar* baz**
//
// Should be rendered as:
- // foobarbaz
+ // foo bar baz
- TestParser.TestSpec("**foo*bar*baz**", "foobarbaz
", "", context: "Example 428\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo *bar* baz**", "foo bar baz
", "", context: "Example 428\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10270,12 +10276,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // ***foo* bar**
+ // **foo*bar*baz**
//
// Should be rendered as:
- // foo bar
+ // foobarbaz
- TestParser.TestSpec("***foo* bar**", "foo bar
", "", context: "Example 429\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo*bar*baz**", "foobarbaz
", "", context: "Example 429\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10285,19 +10291,34 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // ***foo* bar**
+ //
+ // Should be rendered as:
+ // foo bar
+
+ TestParser.TestSpec("***foo* bar**", "foo bar
", "", context: "Example 430\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example431()
+ {
+ // Example 431
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// **foo *bar***
//
// Should be rendered as:
// foo bar
- TestParser.TestSpec("**foo *bar***", "foo bar
", "", context: "Example 430\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo *bar***", "foo bar
", "", context: "Example 431\nSection Inlines / Emphasis and strong emphasis\n");
}
// Indefinite levels of nesting are possible:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example431()
+ public void InlinesEmphasisAndStrongEmphasis_Example432()
{
- // Example 431
+ // Example 432
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10308,13 +10329,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// foo bar baz
// bim bop
- TestParser.TestSpec("**foo *bar **baz**\nbim* bop**", "foo bar baz\nbim bop
", "", context: "Example 431\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo *bar **baz**\nbim* bop**", "foo bar baz\nbim bop
", "", context: "Example 432\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example432()
+ public void InlinesEmphasisAndStrongEmphasis_Example433()
{
- // Example 432
+ // Example 433
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10323,14 +10344,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar
- TestParser.TestSpec("**foo [*bar*](/url)**", "foo bar
", "", context: "Example 432\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo [*bar*](/url)**", "foo bar
", "", context: "Example 433\nSection Inlines / Emphasis and strong emphasis\n");
}
// There can be no empty emphasis or strong emphasis:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example433()
+ public void InlinesEmphasisAndStrongEmphasis_Example434()
{
- // Example 433
+ // Example 434
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10339,13 +10360,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// __ is not an empty emphasis
- TestParser.TestSpec("__ is not an empty emphasis", "__ is not an empty emphasis
", "", context: "Example 433\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__ is not an empty emphasis", "__ is not an empty emphasis
", "", context: "Example 434\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example434()
+ public void InlinesEmphasisAndStrongEmphasis_Example435()
{
- // Example 434
+ // Example 435
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10354,14 +10375,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// ____ is not an empty strong emphasis
- TestParser.TestSpec("____ is not an empty strong emphasis", "____ is not an empty strong emphasis
", "", context: "Example 434\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("____ is not an empty strong emphasis", "____ is not an empty strong emphasis
", "", context: "Example 435\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 11:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example435()
+ public void InlinesEmphasisAndStrongEmphasis_Example436()
{
- // Example 435
+ // Example 436
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10370,22 +10391,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo ***
- TestParser.TestSpec("foo ***", "foo ***
", "", context: "Example 435\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example436()
- {
- // Example 436
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // foo *\**
- //
- // Should be rendered as:
- // foo *
-
- TestParser.TestSpec("foo *\\**", "foo *
", "", context: "Example 436\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo ***", "foo ***
", "", context: "Example 436\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10395,12 +10401,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // foo *_*
+ // foo *\**
//
// Should be rendered as:
- // foo _
+ // foo *
- TestParser.TestSpec("foo *_*", "foo _
", "", context: "Example 437\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo *\\**", "foo *
", "", context: "Example 437\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10410,12 +10416,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // foo *****
+ // foo *_*
//
// Should be rendered as:
- // foo *****
+ // foo _
- TestParser.TestSpec("foo *****", "foo *****
", "", context: "Example 438\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo *_*", "foo _
", "", context: "Example 438\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10425,12 +10431,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // foo **\***
+ // foo *****
//
// Should be rendered as:
- // foo *
+ // foo *****
- TestParser.TestSpec("foo **\\***", "foo *
", "", context: "Example 439\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo *****", "foo *****
", "", context: "Example 439\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10440,21 +10446,36 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // foo **\***
+ //
+ // Should be rendered as:
+ // foo *
+
+ TestParser.TestSpec("foo **\\***", "foo *
", "", context: "Example 440\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example441()
+ {
+ // Example 441
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// foo **_**
//
// Should be rendered as:
// foo _
- TestParser.TestSpec("foo **_**", "foo _
", "", context: "Example 440\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo **_**", "foo _
", "", context: "Example 441\nSection Inlines / Emphasis and strong emphasis\n");
}
// Note that when delimiters do not match evenly, Rule 11 determines
// that the excess literal `*` characters will appear outside of the
// emphasis, rather than inside it:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example441()
+ public void InlinesEmphasisAndStrongEmphasis_Example442()
{
- // Example 441
+ // Example 442
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10463,22 +10484,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// *foo
- TestParser.TestSpec("**foo*", "*foo
", "", context: "Example 441\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example442()
- {
- // Example 442
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // *foo**
- //
- // Should be rendered as:
- // foo*
-
- TestParser.TestSpec("*foo**", "foo*
", "", context: "Example 442\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo*", "*foo
", "", context: "Example 442\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10488,12 +10494,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // ***foo**
+ // *foo**
//
// Should be rendered as:
- // *foo
+ // foo*
- TestParser.TestSpec("***foo**", "*foo
", "", context: "Example 443\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo**", "foo*
", "", context: "Example 443\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10503,12 +10509,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // ****foo*
+ // ***foo**
//
// Should be rendered as:
- // ***foo
+ // *foo
- TestParser.TestSpec("****foo*", "***foo
", "", context: "Example 444\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("***foo**", "*foo
", "", context: "Example 444\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10518,12 +10524,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // **foo***
+ // ****foo*
//
// Should be rendered as:
- // foo*
+ // ***foo
- TestParser.TestSpec("**foo***", "foo*
", "", context: "Example 445\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("****foo*", "***foo
", "", context: "Example 445\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10533,19 +10539,34 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // **foo***
+ //
+ // Should be rendered as:
+ // foo*
+
+ TestParser.TestSpec("**foo***", "foo*
", "", context: "Example 446\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example447()
+ {
+ // Example 447
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// *foo****
//
// Should be rendered as:
// foo***
- TestParser.TestSpec("*foo****", "foo***
", "", context: "Example 446\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo****", "foo***
", "", context: "Example 447\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 12:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example447()
+ public void InlinesEmphasisAndStrongEmphasis_Example448()
{
- // Example 447
+ // Example 448
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10554,22 +10575,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo ___
- TestParser.TestSpec("foo ___", "foo ___
", "", context: "Example 447\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example448()
- {
- // Example 448
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // foo _\__
- //
- // Should be rendered as:
- // foo _
-
- TestParser.TestSpec("foo _\\__", "foo _
", "", context: "Example 448\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo ___", "foo ___
", "", context: "Example 448\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10579,12 +10585,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // foo _*_
+ // foo _\__
//
// Should be rendered as:
- // foo *
+ // foo _
- TestParser.TestSpec("foo _*_", "foo *
", "", context: "Example 449\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo _\\__", "foo _
", "", context: "Example 449\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10594,12 +10600,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // foo _____
+ // foo _*_
//
// Should be rendered as:
- // foo _____
+ // foo *
- TestParser.TestSpec("foo _____", "foo _____
", "", context: "Example 450\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo _*_", "foo *
", "", context: "Example 450\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10609,12 +10615,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // foo __\___
+ // foo _____
//
// Should be rendered as:
- // foo _
+ // foo _____
- TestParser.TestSpec("foo __\\___", "foo _
", "", context: "Example 451\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo _____", "foo _____
", "", context: "Example 451\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10624,12 +10630,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // foo __*__
+ // foo __\___
//
// Should be rendered as:
- // foo *
+ // foo _
- TestParser.TestSpec("foo __*__", "foo *
", "", context: "Example 452\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("foo __\\___", "foo _
", "", context: "Example 452\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10639,21 +10645,36 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // foo __*__
+ //
+ // Should be rendered as:
+ // foo *
+
+ TestParser.TestSpec("foo __*__", "foo *
", "", context: "Example 453\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example454()
+ {
+ // Example 454
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// __foo_
//
// Should be rendered as:
// _foo
- TestParser.TestSpec("__foo_", "_foo
", "", context: "Example 453\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__foo_", "_foo
", "", context: "Example 454\nSection Inlines / Emphasis and strong emphasis\n");
}
// Note that when delimiters do not match evenly, Rule 12 determines
// that the excess literal `_` characters will appear outside of the
// emphasis, rather than inside it:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example454()
+ public void InlinesEmphasisAndStrongEmphasis_Example455()
{
- // Example 454
+ // Example 455
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10662,22 +10683,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo_
- TestParser.TestSpec("_foo__", "foo_
", "", context: "Example 454\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example455()
- {
- // Example 455
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // ___foo__
- //
- // Should be rendered as:
- // _foo
-
- TestParser.TestSpec("___foo__", "_foo
", "", context: "Example 455\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_foo__", "foo_
", "", context: "Example 455\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10687,12 +10693,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // ____foo_
+ // ___foo__
//
// Should be rendered as:
- // ___foo
+ // _foo
- TestParser.TestSpec("____foo_", "___foo
", "", context: "Example 456\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("___foo__", "_foo
", "", context: "Example 456\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10702,12 +10708,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // __foo___
+ // ____foo_
//
// Should be rendered as:
- // foo_
+ // ___foo
- TestParser.TestSpec("__foo___", "foo_
", "", context: "Example 457\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("____foo_", "___foo
", "", context: "Example 457\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10717,20 +10723,35 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // __foo___
+ //
+ // Should be rendered as:
+ // foo_
+
+ TestParser.TestSpec("__foo___", "foo_
", "", context: "Example 458\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example459()
+ {
+ // Example 459
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// _foo____
//
// Should be rendered as:
// foo___
- TestParser.TestSpec("_foo____", "foo___
", "", context: "Example 458\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_foo____", "foo___
", "", context: "Example 459\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 13 implies that if you want emphasis nested directly inside
// emphasis, you must use different delimiters:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example459()
+ public void InlinesEmphasisAndStrongEmphasis_Example460()
{
- // Example 459
+ // Example 460
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10739,22 +10760,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("**foo**", "foo
", "", context: "Example 459\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example460()
- {
- // Example 460
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // *_foo_*
- //
- // Should be rendered as:
- // foo
-
- TestParser.TestSpec("*_foo_*", "foo
", "", context: "Example 460\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo**", "foo
", "", context: "Example 460\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10764,12 +10770,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // __foo__
+ // *_foo_*
//
// Should be rendered as:
- // foo
+ // foo
- TestParser.TestSpec("__foo__", "foo
", "", context: "Example 461\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*_foo_*", "foo
", "", context: "Example 461\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10779,20 +10785,35 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
+ // __foo__
+ //
+ // Should be rendered as:
+ // foo
+
+ TestParser.TestSpec("__foo__", "foo
", "", context: "Example 462\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example463()
+ {
+ // Example 463
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
// _*foo*_
//
// Should be rendered as:
// foo
- TestParser.TestSpec("_*foo*_", "foo
", "", context: "Example 462\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_*foo*_", "foo
", "", context: "Example 463\nSection Inlines / Emphasis and strong emphasis\n");
}
// However, strong emphasis within strong emphasis is possible without
// switching delimiters:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example463()
+ public void InlinesEmphasisAndStrongEmphasis_Example464()
{
- // Example 463
+ // Example 464
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10801,13 +10822,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("****foo****", "foo
", "", context: "Example 463\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("****foo****", "foo
", "", context: "Example 464\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example464()
+ public void InlinesEmphasisAndStrongEmphasis_Example465()
{
- // Example 464
+ // Example 465
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10816,15 +10837,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("____foo____", "foo
", "", context: "Example 464\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("____foo____", "foo
", "", context: "Example 465\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 13 can be applied to arbitrarily long sequences of
// delimiters:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example465()
+ public void InlinesEmphasisAndStrongEmphasis_Example466()
{
- // Example 465
+ // Example 466
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10833,14 +10854,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("******foo******", "foo
", "", context: "Example 465\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("******foo******", "foo
", "", context: "Example 466\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 14:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example466()
+ public void InlinesEmphasisAndStrongEmphasis_Example467()
{
- // Example 466
+ // Example 467
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10849,13 +10870,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("***foo***", "foo
", "", context: "Example 466\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("***foo***", "foo
", "", context: "Example 467\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example467()
+ public void InlinesEmphasisAndStrongEmphasis_Example468()
{
- // Example 467
+ // Example 468
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10864,14 +10885,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("_____foo_____", "foo
", "", context: "Example 467\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_____foo_____", "foo
", "", context: "Example 468\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 15:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example468()
+ public void InlinesEmphasisAndStrongEmphasis_Example469()
{
- // Example 468
+ // Example 469
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10880,13 +10901,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo _bar baz_
- TestParser.TestSpec("*foo _bar* baz_", "foo _bar baz_
", "", context: "Example 468\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo _bar* baz_", "foo _bar baz_
", "", context: "Example 469\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example469()
+ public void InlinesEmphasisAndStrongEmphasis_Example470()
{
- // Example 469
+ // Example 470
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10895,14 +10916,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar *baz bim bam
- TestParser.TestSpec("*foo __bar *baz bim__ bam*", "foo bar *baz bim bam
", "", context: "Example 469\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo __bar *baz bim__ bam*", "foo bar *baz bim bam
", "", context: "Example 470\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 16:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example470()
+ public void InlinesEmphasisAndStrongEmphasis_Example471()
{
- // Example 470
+ // Example 471
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10911,13 +10932,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// **foo bar baz
- TestParser.TestSpec("**foo **bar baz**", "**foo bar baz
", "", context: "Example 470\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**foo **bar baz**", "**foo bar baz
", "", context: "Example 471\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example471()
+ public void InlinesEmphasisAndStrongEmphasis_Example472()
{
- // Example 471
+ // Example 472
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10926,14 +10947,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// *foo bar baz
- TestParser.TestSpec("*foo *bar baz*", "*foo bar baz
", "", context: "Example 471\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*foo *bar baz*", "*foo bar baz
", "", context: "Example 472\nSection Inlines / Emphasis and strong emphasis\n");
}
// Rule 17:
[Test]
- public void InlinesEmphasisAndStrongEmphasis_Example472()
+ public void InlinesEmphasisAndStrongEmphasis_Example473()
{
- // Example 472
+ // Example 473
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
@@ -10942,22 +10963,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// *bar*
- TestParser.TestSpec("*[bar*](/url)", "*bar*
", "", context: "Example 472\nSection Inlines / Emphasis and strong emphasis\n");
- }
-
- [Test]
- public void InlinesEmphasisAndStrongEmphasis_Example473()
- {
- // Example 473
- // Section: Inlines / Emphasis and strong emphasis
- //
- // The following Markdown:
- // _foo [bar_](/url)
- //
- // Should be rendered as:
- // _foo bar_
-
- TestParser.TestSpec("_foo [bar_](/url)", "_foo bar_
", "", context: "Example 473\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*[bar*](/url)", "*bar*
", "", context: "Example 473\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10967,12 +10973,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // *
+ // _foo [bar_](/url)
//
// Should be rendered as:
- // *
+ // _foo bar_
- TestParser.TestSpec("*
", "*
", "", context: "Example 474\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_foo [bar_](/url)", "_foo bar_
", "", context: "Example 474\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10982,12 +10988,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // **
+ // *
//
// Should be rendered as:
- // **
+ // *
- TestParser.TestSpec("**", "**
", "", context: "Example 475\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*
", "*
", "", context: "Example 475\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -10997,12 +11003,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // __
+ // **
//
// Should be rendered as:
- // __
+ // **
- TestParser.TestSpec("__", "__
", "", context: "Example 476\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**", "**
", "", context: "Example 476\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -11012,12 +11018,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // *a `*`*
+ // __
//
// Should be rendered as:
- // a *
+ // __
- TestParser.TestSpec("*a `*`*", "a *
", "", context: "Example 477\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("__", "__
", "", context: "Example 477\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -11027,12 +11033,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // _a `_`_
+ // *a `*`*
//
// Should be rendered as:
- // a _
+ // a *
- TestParser.TestSpec("_a `_`_", "a _
", "", context: "Example 478\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("*a `*`*", "a *
", "", context: "Example 478\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -11042,12 +11048,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // **a
+ // _a `_`_
//
// Should be rendered as:
- // **ahttp://foo.bar/?q=**
+ // a _
- TestParser.TestSpec("**a", "**ahttp://foo.bar/?q=**
", "", context: "Example 479\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("_a `_`_", "a _
", "", context: "Example 479\nSection Inlines / Emphasis and strong emphasis\n");
}
[Test]
@@ -11057,12 +11063,27 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Emphasis and strong emphasis
//
// The following Markdown:
- // __a
+ // **a
//
// Should be rendered as:
- // __ahttp://foo.bar/?q=__
+ // **ahttps://foo.bar/?q=**
- TestParser.TestSpec("__a", "__ahttp://foo.bar/?q=__
", "", context: "Example 480\nSection Inlines / Emphasis and strong emphasis\n");
+ TestParser.TestSpec("**a", "**ahttps://foo.bar/?q=**
", "", context: "Example 480\nSection Inlines / Emphasis and strong emphasis\n");
+ }
+
+ [Test]
+ public void InlinesEmphasisAndStrongEmphasis_Example481()
+ {
+ // Example 481
+ // Section: Inlines / Emphasis and strong emphasis
+ //
+ // The following Markdown:
+ // __a
+ //
+ // Should be rendered as:
+ // __ahttps://foo.bar/?q=__
+
+ TestParser.TestSpec("__a", "__ahttps://foo.bar/?q=__
", "", context: "Example 481\nSection Inlines / Emphasis and strong emphasis\n");
}
}
@@ -11149,9 +11170,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
//
// Here is a simple inline link:
[Test]
- public void InlinesLinks_Example481()
+ public void InlinesLinks_Example482()
{
- // Example 481
+ // Example 482
// Section: Inlines / Links
//
// The following Markdown:
@@ -11160,15 +11181,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link](/uri \"title\")", "link
", "", context: "Example 481\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](/uri \"title\")", "link
", "", context: "Example 482\nSection Inlines / Links\n");
}
// The title, the link text and even
// the destination may be omitted:
[Test]
- public void InlinesLinks_Example482()
+ public void InlinesLinks_Example483()
{
- // Example 482
+ // Example 483
// Section: Inlines / Links
//
// The following Markdown:
@@ -11177,22 +11198,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link](/uri)", "link
", "", context: "Example 482\nSection Inlines / Links\n");
- }
-
- [Test]
- public void InlinesLinks_Example483()
- {
- // Example 483
- // Section: Inlines / Links
- //
- // The following Markdown:
- // [](./target.md)
- //
- // Should be rendered as:
- //
-
- TestParser.TestSpec("[](./target.md)", "
", "", context: "Example 483\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](/uri)", "link
", "", context: "Example 483\nSection Inlines / Links\n");
}
[Test]
@@ -11202,12 +11208,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Links
//
// The following Markdown:
- // [link]()
+ // [](./target.md)
//
// Should be rendered as:
- // link
+ //
- TestParser.TestSpec("[link]()", "link
", "", context: "Example 484\nSection Inlines / Links\n");
+ TestParser.TestSpec("[](./target.md)", "
", "", context: "Example 484\nSection Inlines / Links\n");
}
[Test]
@@ -11217,12 +11223,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Links
//
// The following Markdown:
- // [link](<>)
+ // [link]()
//
// Should be rendered as:
// link
- TestParser.TestSpec("[link](<>)", "link
", "", context: "Example 485\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link]()", "link
", "", context: "Example 485\nSection Inlines / Links\n");
}
[Test]
@@ -11232,20 +11238,35 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Links
//
// The following Markdown:
+ // [link](<>)
+ //
+ // Should be rendered as:
+ // link
+
+ TestParser.TestSpec("[link](<>)", "link
", "", context: "Example 486\nSection Inlines / Links\n");
+ }
+
+ [Test]
+ public void InlinesLinks_Example487()
+ {
+ // Example 487
+ // Section: Inlines / Links
+ //
+ // The following Markdown:
// []()
//
// Should be rendered as:
//
- TestParser.TestSpec("[]()", "
", "", context: "Example 486\nSection Inlines / Links\n");
+ TestParser.TestSpec("[]()", "
", "", context: "Example 487\nSection Inlines / Links\n");
}
// The destination can only contain spaces if it is
// enclosed in pointy brackets:
[Test]
- public void InlinesLinks_Example487()
+ public void InlinesLinks_Example488()
{
- // Example 487
+ // Example 488
// Section: Inlines / Links
//
// The following Markdown:
@@ -11254,13 +11275,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [link](/my uri)
- TestParser.TestSpec("[link](/my uri)", "[link](/my uri)
", "", context: "Example 487\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](/my uri)", "[link](/my uri)
", "", context: "Example 488\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example488()
+ public void InlinesLinks_Example489()
{
- // Example 488
+ // Example 489
// Section: Inlines / Links
//
// The following Markdown:
@@ -11269,15 +11290,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link]()", "link
", "", context: "Example 488\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link]()", "link
", "", context: "Example 489\nSection Inlines / Links\n");
}
// The destination cannot contain line endings,
// even if enclosed in pointy brackets:
[Test]
- public void InlinesLinks_Example489()
+ public void InlinesLinks_Example490()
{
- // Example 489
+ // Example 490
// Section: Inlines / Links
//
// The following Markdown:
@@ -11288,13 +11309,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// [link](foo
// bar)
- TestParser.TestSpec("[link](foo\nbar)", "[link](foo\nbar)
", "", context: "Example 489\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](foo\nbar)", "[link](foo\nbar)
", "", context: "Example 490\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example490()
+ public void InlinesLinks_Example491()
{
- // Example 490
+ // Example 491
// Section: Inlines / Links
//
// The following Markdown:
@@ -11305,15 +11326,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// [link]()
- TestParser.TestSpec("[link]()", "[link]()
", "", context: "Example 490\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link]()", "[link]()
", "", context: "Example 491\nSection Inlines / Links\n");
}
// The destination can contain `)` if it is enclosed
// in pointy brackets:
[Test]
- public void InlinesLinks_Example491()
+ public void InlinesLinks_Example492()
{
- // Example 491
+ // Example 492
// Section: Inlines / Links
//
// The following Markdown:
@@ -11322,14 +11343,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// a
- TestParser.TestSpec("[a]()", "a
", "", context: "Example 491\nSection Inlines / Links\n");
+ TestParser.TestSpec("[a]()", "a
", "", context: "Example 492\nSection Inlines / Links\n");
}
// Pointy brackets that enclose links must be unescaped:
[Test]
- public void InlinesLinks_Example492()
+ public void InlinesLinks_Example493()
{
- // Example 492
+ // Example 493
// Section: Inlines / Links
//
// The following Markdown:
@@ -11338,15 +11359,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [link](<foo>)
- TestParser.TestSpec("[link]()", "[link](<foo>)
", "", context: "Example 492\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link]()", "[link](<foo>)
", "", context: "Example 493\nSection Inlines / Links\n");
}
// These are not links, because the opening pointy bracket
// is not matched properly:
[Test]
- public void InlinesLinks_Example493()
+ public void InlinesLinks_Example494()
{
- // Example 493
+ // Example 494
// Section: Inlines / Links
//
// The following Markdown:
@@ -11359,14 +11380,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// [a](<b)c>
// [a](c)
- TestParser.TestSpec("[a](\n[a](c)", "[a](<b)c\n[a](<b)c>\n[a](c)
", "", context: "Example 493\nSection Inlines / Links\n");
+ TestParser.TestSpec("[a](\n[a](c)", "[a](<b)c\n[a](<b)c>\n[a](c)
", "", context: "Example 494\nSection Inlines / Links\n");
}
// Parentheses inside the link destination may be escaped:
[Test]
- public void InlinesLinks_Example494()
+ public void InlinesLinks_Example495()
{
- // Example 494
+ // Example 495
// Section: Inlines / Links
//
// The following Markdown:
@@ -11375,15 +11396,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link](\\(foo\\))", "link
", "", context: "Example 494\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](\\(foo\\))", "link
", "", context: "Example 495\nSection Inlines / Links\n");
}
// Any number of parentheses are allowed without escaping, as long as they are
// balanced:
[Test]
- public void InlinesLinks_Example495()
+ public void InlinesLinks_Example496()
{
- // Example 495
+ // Example 496
// Section: Inlines / Links
//
// The following Markdown:
@@ -11392,15 +11413,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link](foo(and(bar)))", "link
", "", context: "Example 495\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](foo(and(bar)))", "link
", "", context: "Example 496\nSection Inlines / Links\n");
}
// However, if you have unbalanced parentheses, you need to escape or use the
// `<...>` form:
[Test]
- public void InlinesLinks_Example496()
+ public void InlinesLinks_Example497()
{
- // Example 496
+ // Example 497
// Section: Inlines / Links
//
// The following Markdown:
@@ -11409,22 +11430,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [link](foo(and(bar))
- TestParser.TestSpec("[link](foo(and(bar))", "[link](foo(and(bar))
", "", context: "Example 496\nSection Inlines / Links\n");
- }
-
- [Test]
- public void InlinesLinks_Example497()
- {
- // Example 497
- // Section: Inlines / Links
- //
- // The following Markdown:
- // [link](foo\(and\(bar\))
- //
- // Should be rendered as:
- // link
-
- TestParser.TestSpec("[link](foo\\(and\\(bar\\))", "link
", "", context: "Example 497\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](foo(and(bar))", "[link](foo(and(bar))
", "", context: "Example 497\nSection Inlines / Links\n");
}
[Test]
@@ -11434,20 +11440,35 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Links
//
// The following Markdown:
+ // [link](foo\(and\(bar\))
+ //
+ // Should be rendered as:
+ // link
+
+ TestParser.TestSpec("[link](foo\\(and\\(bar\\))", "link
", "", context: "Example 498\nSection Inlines / Links\n");
+ }
+
+ [Test]
+ public void InlinesLinks_Example499()
+ {
+ // Example 499
+ // Section: Inlines / Links
+ //
+ // The following Markdown:
// [link]()
//
// Should be rendered as:
// link
- TestParser.TestSpec("[link]()", "link
", "", context: "Example 498\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link]()", "link
", "", context: "Example 499\nSection Inlines / Links\n");
}
// Parentheses and other symbols can also be escaped, as usual
// in Markdown:
[Test]
- public void InlinesLinks_Example499()
+ public void InlinesLinks_Example500()
{
- // Example 499
+ // Example 500
// Section: Inlines / Links
//
// The following Markdown:
@@ -11456,37 +11477,37 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link](foo\\)\\:)", "link
", "", context: "Example 499\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](foo\\)\\:)", "link
", "", context: "Example 500\nSection Inlines / Links\n");
}
// A link can contain fragment identifiers and queries:
[Test]
- public void InlinesLinks_Example500()
+ public void InlinesLinks_Example501()
{
- // Example 500
+ // Example 501
// Section: Inlines / Links
//
// The following Markdown:
// [link](#fragment)
//
- // [link](http://example.com#fragment)
+ // [link](https://example.com#fragment)
//
- // [link](http://example.com?foo=3#frag)
+ // [link](https://example.com?foo=3#frag)
//
// Should be rendered as:
// link
- // link
- // link
+ // link
+ // link
- TestParser.TestSpec("[link](#fragment)\n\n[link](http://example.com#fragment)\n\n[link](http://example.com?foo=3#frag)", "link
\nlink
\nlink
", "", context: "Example 500\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](#fragment)\n\n[link](https://example.com#fragment)\n\n[link](https://example.com?foo=3#frag)", "link
\nlink
\nlink
", "", context: "Example 501\nSection Inlines / Links\n");
}
// Note that a backslash before a non-escapable character is
// just a backslash:
[Test]
- public void InlinesLinks_Example501()
+ public void InlinesLinks_Example502()
{
- // Example 501
+ // Example 502
// Section: Inlines / Links
//
// The following Markdown:
@@ -11495,7 +11516,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link](foo\\bar)", "link
", "", context: "Example 501\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](foo\\bar)", "link
", "", context: "Example 502\nSection Inlines / Links\n");
}
// URL-escaping should be left alone inside the destination, as all
@@ -11507,9 +11528,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// HTML or other formats. Renderers may make different decisions
// about how to escape or normalize URLs in the output.
[Test]
- public void InlinesLinks_Example502()
+ public void InlinesLinks_Example503()
{
- // Example 502
+ // Example 503
// Section: Inlines / Links
//
// The following Markdown:
@@ -11518,16 +11539,16 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link](foo%20bä)", "link
", "", context: "Example 502\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](foo%20bä)", "link
", "", context: "Example 503\nSection Inlines / Links\n");
}
// Note that, because titles can often be parsed as destinations,
// if you try to omit the destination and keep the title, you'll
// get unexpected results:
[Test]
- public void InlinesLinks_Example503()
+ public void InlinesLinks_Example504()
{
- // Example 503
+ // Example 504
// Section: Inlines / Links
//
// The following Markdown:
@@ -11536,14 +11557,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link](\"title\")", "link
", "", context: "Example 503\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](\"title\")", "link
", "", context: "Example 504\nSection Inlines / Links\n");
}
// Titles may be in single quotes, double quotes, or parentheses:
[Test]
- public void InlinesLinks_Example504()
+ public void InlinesLinks_Example505()
{
- // Example 504
+ // Example 505
// Section: Inlines / Links
//
// The following Markdown:
@@ -11556,15 +11577,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// link
// link
- TestParser.TestSpec("[link](/url \"title\")\n[link](/url 'title')\n[link](/url (title))", "link\nlink\nlink
", "", context: "Example 504\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](/url \"title\")\n[link](/url 'title')\n[link](/url (title))", "link\nlink\nlink
", "", context: "Example 505\nSection Inlines / Links\n");
}
// Backslash escapes and entity and numeric character references
// may be used in titles:
[Test]
- public void InlinesLinks_Example505()
+ public void InlinesLinks_Example506()
{
- // Example 505
+ // Example 506
// Section: Inlines / Links
//
// The following Markdown:
@@ -11573,16 +11594,16 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link](/url \"title \\\""\")", "link
", "", context: "Example 505\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](/url \"title \\\""\")", "link
", "", context: "Example 506\nSection Inlines / Links\n");
}
// Titles must be separated from the link using spaces, tabs, and up to one line
// ending.
// Other [Unicode whitespace] like non-breaking space doesn't work.
[Test]
- public void InlinesLinks_Example506()
+ public void InlinesLinks_Example507()
{
- // Example 506
+ // Example 507
// Section: Inlines / Links
//
// The following Markdown:
@@ -11591,14 +11612,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link](/url \"title\")", "link
", "", context: "Example 506\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](/url \"title\")", "link
", "", context: "Example 507\nSection Inlines / Links\n");
}
// Nested balanced quotes are not allowed without escaping:
[Test]
- public void InlinesLinks_Example507()
+ public void InlinesLinks_Example508()
{
- // Example 507
+ // Example 508
// Section: Inlines / Links
//
// The following Markdown:
@@ -11607,14 +11628,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [link](/url "title "and" title")
- TestParser.TestSpec("[link](/url \"title \"and\" title\")", "[link](/url "title "and" title")
", "", context: "Example 507\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](/url \"title \"and\" title\")", "[link](/url "title "and" title")
", "", context: "Example 508\nSection Inlines / Links\n");
}
// But it is easy to work around this by using a different quote type:
[Test]
- public void InlinesLinks_Example508()
+ public void InlinesLinks_Example509()
{
- // Example 508
+ // Example 509
// Section: Inlines / Links
//
// The following Markdown:
@@ -11623,7 +11644,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link](/url 'title \"and\" title')", "link
", "", context: "Example 508\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link](/url 'title \"and\" title')", "link
", "", context: "Example 509\nSection Inlines / Links\n");
}
// (Note: `Markdown.pl` did allow double quotes inside a double-quoted
@@ -11644,9 +11665,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Spaces, tabs, and up to one line ending is allowed around the destination and
// title:
[Test]
- public void InlinesLinks_Example509()
+ public void InlinesLinks_Example510()
{
- // Example 509
+ // Example 510
// Section: Inlines / Links
//
// The following Markdown:
@@ -11656,15 +11677,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link
- TestParser.TestSpec("[link]( /uri\n \"title\" )", "link
", "", context: "Example 509\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link]( /uri\n \"title\" )", "link
", "", context: "Example 510\nSection Inlines / Links\n");
}
// But it is not allowed between the link text and the
// following parenthesis:
[Test]
- public void InlinesLinks_Example510()
+ public void InlinesLinks_Example511()
{
- // Example 510
+ // Example 511
// Section: Inlines / Links
//
// The following Markdown:
@@ -11673,15 +11694,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [link] (/uri)
- TestParser.TestSpec("[link] (/uri)", "[link] (/uri)
", "", context: "Example 510\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link] (/uri)", "[link] (/uri)
", "", context: "Example 511\nSection Inlines / Links\n");
}
// The link text may contain balanced brackets, but not unbalanced ones,
// unless they are escaped:
[Test]
- public void InlinesLinks_Example511()
+ public void InlinesLinks_Example512()
{
- // Example 511
+ // Example 512
// Section: Inlines / Links
//
// The following Markdown:
@@ -11690,22 +11711,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link [foo [bar]]
- TestParser.TestSpec("[link [foo [bar]]](/uri)", "link [foo [bar]]
", "", context: "Example 511\nSection Inlines / Links\n");
- }
-
- [Test]
- public void InlinesLinks_Example512()
- {
- // Example 512
- // Section: Inlines / Links
- //
- // The following Markdown:
- // [link] bar](/uri)
- //
- // Should be rendered as:
- // [link] bar](/uri)
-
- TestParser.TestSpec("[link] bar](/uri)", "[link] bar](/uri)
", "", context: "Example 512\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link [foo [bar]]](/uri)", "link [foo [bar]]
", "", context: "Example 512\nSection Inlines / Links\n");
}
[Test]
@@ -11715,12 +11721,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Links
//
// The following Markdown:
- // [link [bar](/uri)
+ // [link] bar](/uri)
//
// Should be rendered as:
- // [link bar
+ // [link] bar](/uri)
- TestParser.TestSpec("[link [bar](/uri)", "[link bar
", "", context: "Example 513\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link] bar](/uri)", "[link] bar](/uri)
", "", context: "Example 513\nSection Inlines / Links\n");
}
[Test]
@@ -11730,19 +11736,34 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Links
//
// The following Markdown:
+ // [link [bar](/uri)
+ //
+ // Should be rendered as:
+ // [link bar
+
+ TestParser.TestSpec("[link [bar](/uri)", "[link bar
", "", context: "Example 514\nSection Inlines / Links\n");
+ }
+
+ [Test]
+ public void InlinesLinks_Example515()
+ {
+ // Example 515
+ // Section: Inlines / Links
+ //
+ // The following Markdown:
// [link \[bar](/uri)
//
// Should be rendered as:
// link [bar
- TestParser.TestSpec("[link \\[bar](/uri)", "link [bar
", "", context: "Example 514\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link \\[bar](/uri)", "link [bar
", "", context: "Example 515\nSection Inlines / Links\n");
}
// The link text may contain inline content:
[Test]
- public void InlinesLinks_Example515()
+ public void InlinesLinks_Example516()
{
- // Example 515
+ // Example 516
// Section: Inlines / Links
//
// The following Markdown:
@@ -11751,13 +11772,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link foo bar #
- TestParser.TestSpec("[link *foo **bar** `#`*](/uri)", "link foo bar #
", "", context: "Example 515\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link *foo **bar** `#`*](/uri)", "link foo bar #
", "", context: "Example 516\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example516()
+ public void InlinesLinks_Example517()
{
- // Example 516
+ // Example 517
// Section: Inlines / Links
//
// The following Markdown:
@@ -11766,14 +11787,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("[](/uri)", "
", "", context: "Example 516\nSection Inlines / Links\n");
+ TestParser.TestSpec("[](/uri)", "
", "", context: "Example 517\nSection Inlines / Links\n");
}
// However, links may not contain other links, at any level of nesting.
[Test]
- public void InlinesLinks_Example517()
+ public void InlinesLinks_Example518()
{
- // Example 517
+ // Example 518
// Section: Inlines / Links
//
// The following Markdown:
@@ -11782,22 +11803,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [foo bar](/uri)
- TestParser.TestSpec("[foo [bar](/uri)](/uri)", "[foo bar](/uri)
", "", context: "Example 517\nSection Inlines / Links\n");
- }
-
- [Test]
- public void InlinesLinks_Example518()
- {
- // Example 518
- // Section: Inlines / Links
- //
- // The following Markdown:
- // [foo *[bar [baz](/uri)](/uri)*](/uri)
- //
- // Should be rendered as:
- // [foo [bar baz](/uri)](/uri)
-
- TestParser.TestSpec("[foo *[bar [baz](/uri)](/uri)*](/uri)", "[foo [bar baz](/uri)](/uri)
", "", context: "Example 518\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo [bar](/uri)](/uri)", "[foo bar](/uri)
", "", context: "Example 518\nSection Inlines / Links\n");
}
[Test]
@@ -11807,20 +11813,35 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Links
//
// The following Markdown:
+ // [foo *[bar [baz](/uri)](/uri)*](/uri)
+ //
+ // Should be rendered as:
+ // [foo [bar baz](/uri)](/uri)
+
+ TestParser.TestSpec("[foo *[bar [baz](/uri)](/uri)*](/uri)", "[foo [bar baz](/uri)](/uri)
", "", context: "Example 519\nSection Inlines / Links\n");
+ }
+
+ [Test]
+ public void InlinesLinks_Example520()
+ {
+ // Example 520
+ // Section: Inlines / Links
+ //
+ // The following Markdown:
// ](uri2)](uri3)
//
// Should be rendered as:
// ](uri3)
- TestParser.TestSpec("](uri2)](uri3)", "\"](\"uri3\")
", "", context: "Example 519\nSection Inlines / Links\n");
+ TestParser.TestSpec("](uri2)](uri3)", "\"](\"uri3\")
", "", context: "Example 520\nSection Inlines / Links\n");
}
// These cases illustrate the precedence of link text grouping over
// emphasis grouping:
[Test]
- public void InlinesLinks_Example520()
+ public void InlinesLinks_Example521()
{
- // Example 520
+ // Example 521
// Section: Inlines / Links
//
// The following Markdown:
@@ -11829,13 +11850,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// *foo*
- TestParser.TestSpec("*[foo*](/uri)", "*foo*
", "", context: "Example 520\nSection Inlines / Links\n");
+ TestParser.TestSpec("*[foo*](/uri)", "*foo*
", "", context: "Example 521\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example521()
+ public void InlinesLinks_Example522()
{
- // Example 521
+ // Example 522
// Section: Inlines / Links
//
// The following Markdown:
@@ -11844,15 +11865,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo *bar
- TestParser.TestSpec("[foo *bar](baz*)", "foo *bar
", "", context: "Example 521\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo *bar](baz*)", "foo *bar
", "", context: "Example 522\nSection Inlines / Links\n");
}
// Note that brackets that *aren't* part of links do not take
// precedence:
[Test]
- public void InlinesLinks_Example522()
+ public void InlinesLinks_Example523()
{
- // Example 522
+ // Example 523
// Section: Inlines / Links
//
// The following Markdown:
@@ -11861,15 +11882,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo [bar baz]
- TestParser.TestSpec("*foo [bar* baz]", "foo [bar baz]
", "", context: "Example 522\nSection Inlines / Links\n");
+ TestParser.TestSpec("*foo [bar* baz]", "foo [bar baz]
", "", context: "Example 523\nSection Inlines / Links\n");
}
// These cases illustrate the precedence of HTML tags, code spans,
// and autolinks over link grouping:
[Test]
- public void InlinesLinks_Example523()
+ public void InlinesLinks_Example524()
{
- // Example 523
+ // Example 524
// Section: Inlines / Links
//
// The following Markdown:
@@ -11878,22 +11899,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [foo
- TestParser.TestSpec("[foo ", "[foo
", "", context: "Example 523\nSection Inlines / Links\n");
- }
-
- [Test]
- public void InlinesLinks_Example524()
- {
- // Example 524
- // Section: Inlines / Links
- //
- // The following Markdown:
- // [foo`](/uri)`
- //
- // Should be rendered as:
- // [foo](/uri)
-
- TestParser.TestSpec("[foo`](/uri)`", "[foo](/uri)
", "", context: "Example 524\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo ", "[foo
", "", context: "Example 524\nSection Inlines / Links\n");
}
[Test]
@@ -11903,12 +11909,27 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Links
//
// The following Markdown:
- // [foo
+ // [foo`](/uri)`
//
// Should be rendered as:
- // [foohttp://example.com/?search=](uri)
+ // [foo](/uri)
- TestParser.TestSpec("[foo", "[foohttp://example.com/?search=](uri)
", "", context: "Example 525\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo`](/uri)`", "[foo](/uri)
", "", context: "Example 525\nSection Inlines / Links\n");
+ }
+
+ [Test]
+ public void InlinesLinks_Example526()
+ {
+ // Example 526
+ // Section: Inlines / Links
+ //
+ // The following Markdown:
+ // [foo
+ //
+ // Should be rendered as:
+ // [foohttps://example.com/?search=](uri)
+
+ TestParser.TestSpec("[foo", "[foohttps://example.com/?search=](uri)
", "", context: "Example 526\nSection Inlines / Links\n");
}
// There are three kinds of [reference link](@)s:
@@ -11942,9 +11963,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
//
// Here is a simple example:
[Test]
- public void InlinesLinks_Example526()
+ public void InlinesLinks_Example527()
{
- // Example 526
+ // Example 527
// Section: Inlines / Links
//
// The following Markdown:
@@ -11955,7 +11976,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("[foo][bar]\n\n[bar]: /url \"title\"", "foo
", "", context: "Example 526\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo][bar]\n\n[bar]: /url \"title\"", "foo
", "", context: "Example 527\nSection Inlines / Links\n");
}
// The rules for the [link text] are the same as with
@@ -11964,9 +11985,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// The link text may contain balanced brackets, but not unbalanced ones,
// unless they are escaped:
[Test]
- public void InlinesLinks_Example527()
+ public void InlinesLinks_Example528()
{
- // Example 527
+ // Example 528
// Section: Inlines / Links
//
// The following Markdown:
@@ -11977,13 +11998,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link [foo [bar]]
- TestParser.TestSpec("[link [foo [bar]]][ref]\n\n[ref]: /uri", "link [foo [bar]]
", "", context: "Example 527\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link [foo [bar]]][ref]\n\n[ref]: /uri", "link [foo [bar]]
", "", context: "Example 528\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example528()
+ public void InlinesLinks_Example529()
{
- // Example 528
+ // Example 529
// Section: Inlines / Links
//
// The following Markdown:
@@ -11994,14 +12015,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link [bar
- TestParser.TestSpec("[link \\[bar][ref]\n\n[ref]: /uri", "link [bar
", "", context: "Example 528\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link \\[bar][ref]\n\n[ref]: /uri", "link [bar
", "", context: "Example 529\nSection Inlines / Links\n");
}
// The link text may contain inline content:
[Test]
- public void InlinesLinks_Example529()
+ public void InlinesLinks_Example530()
{
- // Example 529
+ // Example 530
// Section: Inlines / Links
//
// The following Markdown:
@@ -12012,13 +12033,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// link foo bar #
- TestParser.TestSpec("[link *foo **bar** `#`*][ref]\n\n[ref]: /uri", "link foo bar #
", "", context: "Example 529\nSection Inlines / Links\n");
+ TestParser.TestSpec("[link *foo **bar** `#`*][ref]\n\n[ref]: /uri", "link foo bar #
", "", context: "Example 530\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example530()
+ public void InlinesLinks_Example531()
{
- // Example 530
+ // Example 531
// Section: Inlines / Links
//
// The following Markdown:
@@ -12029,14 +12050,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("[][ref]\n\n[ref]: /uri", "
", "", context: "Example 530\nSection Inlines / Links\n");
+ TestParser.TestSpec("[][ref]\n\n[ref]: /uri", "
", "", context: "Example 531\nSection Inlines / Links\n");
}
// However, links may not contain other links, at any level of nesting.
[Test]
- public void InlinesLinks_Example531()
+ public void InlinesLinks_Example532()
{
- // Example 531
+ // Example 532
// Section: Inlines / Links
//
// The following Markdown:
@@ -12047,13 +12068,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [foo bar]ref
- TestParser.TestSpec("[foo [bar](/uri)][ref]\n\n[ref]: /uri", "[foo bar]ref
", "", context: "Example 531\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo [bar](/uri)][ref]\n\n[ref]: /uri", "[foo bar]ref
", "", context: "Example 532\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example532()
+ public void InlinesLinks_Example533()
{
- // Example 532
+ // Example 533
// Section: Inlines / Links
//
// The following Markdown:
@@ -12064,7 +12085,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [foo bar baz]ref
- TestParser.TestSpec("[foo *bar [baz][ref]*][ref]\n\n[ref]: /uri", "[foo bar baz]ref
", "", context: "Example 532\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo *bar [baz][ref]*][ref]\n\n[ref]: /uri", "[foo bar baz]ref
", "", context: "Example 533\nSection Inlines / Links\n");
}
// (In the examples above, we have two [shortcut reference links]
@@ -12073,9 +12094,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// The following cases illustrate the precedence of link text grouping over
// emphasis grouping:
[Test]
- public void InlinesLinks_Example533()
+ public void InlinesLinks_Example534()
{
- // Example 533
+ // Example 534
// Section: Inlines / Links
//
// The following Markdown:
@@ -12086,13 +12107,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// *foo*
- TestParser.TestSpec("*[foo*][ref]\n\n[ref]: /uri", "*foo*
", "", context: "Example 533\nSection Inlines / Links\n");
+ TestParser.TestSpec("*[foo*][ref]\n\n[ref]: /uri", "*foo*
", "", context: "Example 534\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example534()
+ public void InlinesLinks_Example535()
{
- // Example 534
+ // Example 535
// Section: Inlines / Links
//
// The following Markdown:
@@ -12103,15 +12124,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo *bar*
- TestParser.TestSpec("[foo *bar][ref]*\n\n[ref]: /uri", "foo *bar*
", "", context: "Example 534\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo *bar][ref]*\n\n[ref]: /uri", "foo *bar*
", "", context: "Example 535\nSection Inlines / Links\n");
}
// These cases illustrate the precedence of HTML tags, code spans,
// and autolinks over link grouping:
[Test]
- public void InlinesLinks_Example535()
+ public void InlinesLinks_Example536()
{
- // Example 535
+ // Example 536
// Section: Inlines / Links
//
// The following Markdown:
@@ -12122,13 +12143,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [foo
- TestParser.TestSpec("[foo \n\n[ref]: /uri", "[foo
", "", context: "Example 535\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo \n\n[ref]: /uri", "[foo
", "", context: "Example 536\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example536()
+ public void InlinesLinks_Example537()
{
- // Example 536
+ // Example 537
// Section: Inlines / Links
//
// The following Markdown:
@@ -12139,27 +12160,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [foo][ref]
- TestParser.TestSpec("[foo`][ref]`\n\n[ref]: /uri", "[foo][ref]
", "", context: "Example 536\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo`][ref]`\n\n[ref]: /uri", "[foo][ref]
", "", context: "Example 537\nSection Inlines / Links\n");
}
- [Test]
- public void InlinesLinks_Example537()
- {
- // Example 537
- // Section: Inlines / Links
- //
- // The following Markdown:
- // [foo
- //
- // [ref]: /uri
- //
- // Should be rendered as:
- // [foohttp://example.com/?search=][ref]
-
- TestParser.TestSpec("[foo\n\n[ref]: /uri", "[foohttp://example.com/?search=][ref]
", "", context: "Example 537\nSection Inlines / Links\n");
- }
-
- // Matching is case-insensitive:
[Test]
public void InlinesLinks_Example538()
{
@@ -12167,6 +12170,24 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Links
//
// The following Markdown:
+ // [foo
+ //
+ // [ref]: /uri
+ //
+ // Should be rendered as:
+ // [foohttps://example.com/?search=][ref]
+
+ TestParser.TestSpec("[foo\n\n[ref]: /uri", "[foohttps://example.com/?search=][ref]
", "", context: "Example 538\nSection Inlines / Links\n");
+ }
+
+ // Matching is case-insensitive:
+ [Test]
+ public void InlinesLinks_Example539()
+ {
+ // Example 539
+ // Section: Inlines / Links
+ //
+ // The following Markdown:
// [foo][BaR]
//
// [bar]: /url "title"
@@ -12174,14 +12195,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("[foo][BaR]\n\n[bar]: /url \"title\"", "foo
", "", context: "Example 538\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo][BaR]\n\n[bar]: /url \"title\"", "foo
", "", context: "Example 539\nSection Inlines / Links\n");
}
// Unicode case fold is used:
[Test]
- public void InlinesLinks_Example539()
+ public void InlinesLinks_Example540()
{
- // Example 539
+ // Example 540
// Section: Inlines / Links
//
// The following Markdown:
@@ -12192,15 +12213,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// ẞ
- TestParser.TestSpec("[ẞ]\n\n[SS]: /url", "ẞ
", "", context: "Example 539\nSection Inlines / Links\n");
+ TestParser.TestSpec("[ẞ]\n\n[SS]: /url", "ẞ
", "", context: "Example 540\nSection Inlines / Links\n");
}
// Consecutive internal spaces, tabs, and line endings are treated as one space for
// purposes of determining matching:
[Test]
- public void InlinesLinks_Example540()
+ public void InlinesLinks_Example541()
{
- // Example 540
+ // Example 541
// Section: Inlines / Links
//
// The following Markdown:
@@ -12212,15 +12233,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// Baz
- TestParser.TestSpec("[Foo\n bar]: /url\n\n[Baz][Foo bar]", "Baz
", "", context: "Example 540\nSection Inlines / Links\n");
+ TestParser.TestSpec("[Foo\n bar]: /url\n\n[Baz][Foo bar]", "Baz
", "", context: "Example 541\nSection Inlines / Links\n");
}
// No spaces, tabs, or line endings are allowed between the [link text] and the
// [link label]:
[Test]
- public void InlinesLinks_Example541()
+ public void InlinesLinks_Example542()
{
- // Example 541
+ // Example 542
// Section: Inlines / Links
//
// The following Markdown:
@@ -12231,13 +12252,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [foo] bar
- TestParser.TestSpec("[foo] [bar]\n\n[bar]: /url \"title\"", "[foo] bar
", "", context: "Example 541\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo] [bar]\n\n[bar]: /url \"title\"", "[foo] bar
", "", context: "Example 542\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example542()
+ public void InlinesLinks_Example543()
{
- // Example 542
+ // Example 543
// Section: Inlines / Links
//
// The following Markdown:
@@ -12250,7 +12271,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// [foo]
// bar
- TestParser.TestSpec("[foo]\n[bar]\n\n[bar]: /url \"title\"", "[foo]\nbar
", "", context: "Example 542\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo]\n[bar]\n\n[bar]: /url \"title\"", "[foo]\nbar
", "", context: "Example 543\nSection Inlines / Links\n");
}
// This is a departure from John Gruber's original Markdown syntax
@@ -12283,9 +12304,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// When there are multiple matching [link reference definitions],
// the first is used:
[Test]
- public void InlinesLinks_Example543()
+ public void InlinesLinks_Example544()
{
- // Example 543
+ // Example 544
// Section: Inlines / Links
//
// The following Markdown:
@@ -12298,16 +12319,16 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// bar
- TestParser.TestSpec("[foo]: /url1\n\n[foo]: /url2\n\n[bar][foo]", "bar
", "", context: "Example 543\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo]: /url1\n\n[foo]: /url2\n\n[bar][foo]", "bar
", "", context: "Example 544\nSection Inlines / Links\n");
}
// Note that matching is performed on normalized strings, not parsed
// inline content. So the following does not match, even though the
// labels define equivalent inline content:
[Test]
- public void InlinesLinks_Example544()
+ public void InlinesLinks_Example545()
{
- // Example 544
+ // Example 545
// Section: Inlines / Links
//
// The following Markdown:
@@ -12318,15 +12339,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [bar][foo!]
- TestParser.TestSpec("[bar][foo\\!]\n\n[foo!]: /url", "[bar][foo!]
", "", context: "Example 544\nSection Inlines / Links\n");
+ TestParser.TestSpec("[bar][foo\\!]\n\n[foo!]: /url", "[bar][foo!]
", "", context: "Example 545\nSection Inlines / Links\n");
}
// [Link labels] cannot contain brackets, unless they are
// backslash-escaped:
[Test]
- public void InlinesLinks_Example545()
+ public void InlinesLinks_Example546()
{
- // Example 545
+ // Example 546
// Section: Inlines / Links
//
// The following Markdown:
@@ -12338,13 +12359,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// [foo][ref[]
// [ref[]: /uri
- TestParser.TestSpec("[foo][ref[]\n\n[ref[]: /uri", "[foo][ref[]
\n[ref[]: /uri
", "", context: "Example 545\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo][ref[]\n\n[ref[]: /uri", "[foo][ref[]
\n[ref[]: /uri
", "", context: "Example 546\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example546()
+ public void InlinesLinks_Example547()
{
- // Example 546
+ // Example 547
// Section: Inlines / Links
//
// The following Markdown:
@@ -12356,13 +12377,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// [foo][ref[bar]]
// [ref[bar]]: /uri
- TestParser.TestSpec("[foo][ref[bar]]\n\n[ref[bar]]: /uri", "[foo][ref[bar]]
\n[ref[bar]]: /uri
", "", context: "Example 546\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo][ref[bar]]\n\n[ref[bar]]: /uri", "[foo][ref[bar]]
\n[ref[bar]]: /uri
", "", context: "Example 547\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example547()
+ public void InlinesLinks_Example548()
{
- // Example 547
+ // Example 548
// Section: Inlines / Links
//
// The following Markdown:
@@ -12374,13 +12395,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// [[[foo]]]
// [[[foo]]]: /url
- TestParser.TestSpec("[[[foo]]]\n\n[[[foo]]]: /url", "[[[foo]]]
\n[[[foo]]]: /url
", "", context: "Example 547\nSection Inlines / Links\n");
+ TestParser.TestSpec("[[[foo]]]\n\n[[[foo]]]: /url", "[[[foo]]]
\n[[[foo]]]: /url
", "", context: "Example 548\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example548()
+ public void InlinesLinks_Example549()
{
- // Example 548
+ // Example 549
// Section: Inlines / Links
//
// The following Markdown:
@@ -12391,14 +12412,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("[foo][ref\\[]\n\n[ref\\[]: /uri", "foo
", "", context: "Example 548\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo][ref\\[]\n\n[ref\\[]: /uri", "foo
", "", context: "Example 549\nSection Inlines / Links\n");
}
// Note that in this example `]` is not backslash-escaped:
[Test]
- public void InlinesLinks_Example549()
+ public void InlinesLinks_Example550()
{
- // Example 549
+ // Example 550
// Section: Inlines / Links
//
// The following Markdown:
@@ -12409,15 +12430,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// bar\
- TestParser.TestSpec("[bar\\\\]: /uri\n\n[bar\\\\]", "bar\\
", "", context: "Example 549\nSection Inlines / Links\n");
+ TestParser.TestSpec("[bar\\\\]: /uri\n\n[bar\\\\]", "bar\\
", "", context: "Example 550\nSection Inlines / Links\n");
}
// A [link label] must contain at least one character that is not a space, tab, or
// line ending:
[Test]
- public void InlinesLinks_Example550()
+ public void InlinesLinks_Example551()
{
- // Example 550
+ // Example 551
// Section: Inlines / Links
//
// The following Markdown:
@@ -12429,13 +12450,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// []
// []: /uri
- TestParser.TestSpec("[]\n\n[]: /uri", "[]
\n[]: /uri
", "", context: "Example 550\nSection Inlines / Links\n");
+ TestParser.TestSpec("[]\n\n[]: /uri", "[]
\n[]: /uri
", "", context: "Example 551\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example551()
+ public void InlinesLinks_Example552()
{
- // Example 551
+ // Example 552
// Section: Inlines / Links
//
// The following Markdown:
@@ -12451,21 +12472,21 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// [
// ]: /uri
- TestParser.TestSpec("[\n ]\n\n[\n ]: /uri", "[\n]
\n[\n]: /uri
", "", context: "Example 551\nSection Inlines / Links\n");
+ TestParser.TestSpec("[\n ]\n\n[\n ]: /uri", "[\n]
\n[\n]: /uri
", "", context: "Example 552\nSection Inlines / Links\n");
}
// A [collapsed reference link](@)
// consists of a [link label] that [matches] a
// [link reference definition] elsewhere in the
// document, followed by the string `[]`.
- // The contents of the first link label are parsed as inlines,
+ // The contents of the link label are parsed as inlines,
// which are used as the link's text. The link's URI and title are
// provided by the matching reference link definition. Thus,
// `[foo][]` is equivalent to `[foo][foo]`.
[Test]
- public void InlinesLinks_Example552()
+ public void InlinesLinks_Example553()
{
- // Example 552
+ // Example 553
// Section: Inlines / Links
//
// The following Markdown:
@@ -12476,13 +12497,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("[foo][]\n\n[foo]: /url \"title\"", "foo
", "", context: "Example 552\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo][]\n\n[foo]: /url \"title\"", "foo
", "", context: "Example 553\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example553()
+ public void InlinesLinks_Example554()
{
- // Example 553
+ // Example 554
// Section: Inlines / Links
//
// The following Markdown:
@@ -12493,14 +12514,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar
- TestParser.TestSpec("[*foo* bar][]\n\n[*foo* bar]: /url \"title\"", "foo bar
", "", context: "Example 553\nSection Inlines / Links\n");
+ TestParser.TestSpec("[*foo* bar][]\n\n[*foo* bar]: /url \"title\"", "foo bar
", "", context: "Example 554\nSection Inlines / Links\n");
}
// The link labels are case-insensitive:
[Test]
- public void InlinesLinks_Example554()
+ public void InlinesLinks_Example555()
{
- // Example 554
+ // Example 555
// Section: Inlines / Links
//
// The following Markdown:
@@ -12511,15 +12532,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// Foo
- TestParser.TestSpec("[Foo][]\n\n[foo]: /url \"title\"", "Foo
", "", context: "Example 554\nSection Inlines / Links\n");
+ TestParser.TestSpec("[Foo][]\n\n[foo]: /url \"title\"", "Foo
", "", context: "Example 555\nSection Inlines / Links\n");
}
// As with full reference links, spaces, tabs, or line endings are not
// allowed between the two sets of brackets:
[Test]
- public void InlinesLinks_Example555()
+ public void InlinesLinks_Example556()
{
- // Example 555
+ // Example 556
// Section: Inlines / Links
//
// The following Markdown:
@@ -12532,21 +12553,21 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// foo
// []
- TestParser.TestSpec("[foo] \n[]\n\n[foo]: /url \"title\"", "foo\n[]
", "", context: "Example 555\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo] \n[]\n\n[foo]: /url \"title\"", "foo\n[]
", "", context: "Example 556\nSection Inlines / Links\n");
}
// A [shortcut reference link](@)
// consists of a [link label] that [matches] a
// [link reference definition] elsewhere in the
// document and is not followed by `[]` or a link label.
- // The contents of the first link label are parsed as inlines,
+ // The contents of the link label are parsed as inlines,
// which are used as the link's text. The link's URI and title
// are provided by the matching link reference definition.
// Thus, `[foo]` is equivalent to `[foo][]`.
[Test]
- public void InlinesLinks_Example556()
+ public void InlinesLinks_Example557()
{
- // Example 556
+ // Example 557
// Section: Inlines / Links
//
// The following Markdown:
@@ -12557,13 +12578,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("[foo]\n\n[foo]: /url \"title\"", "foo
", "", context: "Example 556\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo]\n\n[foo]: /url \"title\"", "foo
", "", context: "Example 557\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example557()
+ public void InlinesLinks_Example558()
{
- // Example 557
+ // Example 558
// Section: Inlines / Links
//
// The following Markdown:
@@ -12574,13 +12595,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar
- TestParser.TestSpec("[*foo* bar]\n\n[*foo* bar]: /url \"title\"", "foo bar
", "", context: "Example 557\nSection Inlines / Links\n");
+ TestParser.TestSpec("[*foo* bar]\n\n[*foo* bar]: /url \"title\"", "foo bar
", "", context: "Example 558\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example558()
+ public void InlinesLinks_Example559()
{
- // Example 558
+ // Example 559
// Section: Inlines / Links
//
// The following Markdown:
@@ -12591,13 +12612,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [foo bar]
- TestParser.TestSpec("[[*foo* bar]]\n\n[*foo* bar]: /url \"title\"", "[foo bar]
", "", context: "Example 558\nSection Inlines / Links\n");
+ TestParser.TestSpec("[[*foo* bar]]\n\n[*foo* bar]: /url \"title\"", "[foo bar]
", "", context: "Example 559\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example559()
+ public void InlinesLinks_Example560()
{
- // Example 559
+ // Example 560
// Section: Inlines / Links
//
// The following Markdown:
@@ -12608,14 +12629,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [[bar foo
- TestParser.TestSpec("[[bar [foo]\n\n[foo]: /url", "[[bar foo
", "", context: "Example 559\nSection Inlines / Links\n");
+ TestParser.TestSpec("[[bar [foo]\n\n[foo]: /url", "[[bar foo
", "", context: "Example 560\nSection Inlines / Links\n");
}
// The link labels are case-insensitive:
[Test]
- public void InlinesLinks_Example560()
+ public void InlinesLinks_Example561()
{
- // Example 560
+ // Example 561
// Section: Inlines / Links
//
// The following Markdown:
@@ -12626,14 +12647,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// Foo
- TestParser.TestSpec("[Foo]\n\n[foo]: /url \"title\"", "Foo
", "", context: "Example 560\nSection Inlines / Links\n");
+ TestParser.TestSpec("[Foo]\n\n[foo]: /url \"title\"", "Foo
", "", context: "Example 561\nSection Inlines / Links\n");
}
// A space after the link text should be preserved:
[Test]
- public void InlinesLinks_Example561()
+ public void InlinesLinks_Example562()
{
- // Example 561
+ // Example 562
// Section: Inlines / Links
//
// The following Markdown:
@@ -12644,15 +12665,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo bar
- TestParser.TestSpec("[foo] bar\n\n[foo]: /url", "foo bar
", "", context: "Example 561\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo] bar\n\n[foo]: /url", "foo bar
", "", context: "Example 562\nSection Inlines / Links\n");
}
// If you just want bracketed text, you can backslash-escape the
// opening bracket to avoid links:
[Test]
- public void InlinesLinks_Example562()
+ public void InlinesLinks_Example563()
{
- // Example 562
+ // Example 563
// Section: Inlines / Links
//
// The following Markdown:
@@ -12663,15 +12684,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [foo]
- TestParser.TestSpec("\\[foo]\n\n[foo]: /url \"title\"", "[foo]
", "", context: "Example 562\nSection Inlines / Links\n");
+ TestParser.TestSpec("\\[foo]\n\n[foo]: /url \"title\"", "[foo]
", "", context: "Example 563\nSection Inlines / Links\n");
}
// Note that this is a link, because a link label ends with the first
// following closing bracket:
[Test]
- public void InlinesLinks_Example563()
+ public void InlinesLinks_Example564()
{
- // Example 563
+ // Example 564
// Section: Inlines / Links
//
// The following Markdown:
@@ -12682,15 +12703,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// *foo*
- TestParser.TestSpec("[foo*]: /url\n\n*[foo*]", "*foo*
", "", context: "Example 563\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo*]: /url\n\n*[foo*]", "*foo*
", "", context: "Example 564\nSection Inlines / Links\n");
}
- // Full and compact references take precedence over shortcut
+ // Full and collapsed references take precedence over shortcut
// references:
[Test]
- public void InlinesLinks_Example564()
+ public void InlinesLinks_Example565()
{
- // Example 564
+ // Example 565
// Section: Inlines / Links
//
// The following Markdown:
@@ -12702,13 +12723,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("[foo][bar]\n\n[foo]: /url1\n[bar]: /url2", "foo
", "", context: "Example 564\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo][bar]\n\n[foo]: /url1\n[bar]: /url2", "foo
", "", context: "Example 565\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example565()
+ public void InlinesLinks_Example566()
{
- // Example 565
+ // Example 566
// Section: Inlines / Links
//
// The following Markdown:
@@ -12719,14 +12740,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("[foo][]\n\n[foo]: /url1", "foo
", "", context: "Example 565\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo][]\n\n[foo]: /url1", "foo
", "", context: "Example 566\nSection Inlines / Links\n");
}
// Inline links also take precedence:
[Test]
- public void InlinesLinks_Example566()
+ public void InlinesLinks_Example567()
{
- // Example 566
+ // Example 567
// Section: Inlines / Links
//
// The following Markdown:
@@ -12737,13 +12758,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo
- TestParser.TestSpec("[foo]()\n\n[foo]: /url1", "foo
", "", context: "Example 566\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo]()\n\n[foo]: /url1", "foo
", "", context: "Example 567\nSection Inlines / Links\n");
}
[Test]
- public void InlinesLinks_Example567()
+ public void InlinesLinks_Example568()
{
- // Example 567
+ // Example 568
// Section: Inlines / Links
//
// The following Markdown:
@@ -12754,15 +12775,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo(not a link)
- TestParser.TestSpec("[foo](not a link)\n\n[foo]: /url1", "foo(not a link)
", "", context: "Example 567\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo](not a link)\n\n[foo]: /url1", "foo(not a link)
", "", context: "Example 568\nSection Inlines / Links\n");
}
// In the following case `[bar][baz]` is parsed as a reference,
// `[foo]` as normal text:
[Test]
- public void InlinesLinks_Example568()
+ public void InlinesLinks_Example569()
{
- // Example 568
+ // Example 569
// Section: Inlines / Links
//
// The following Markdown:
@@ -12773,15 +12794,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [foo]bar
- TestParser.TestSpec("[foo][bar][baz]\n\n[baz]: /url", "[foo]bar
", "", context: "Example 568\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo][bar][baz]\n\n[baz]: /url", "[foo]bar
", "", context: "Example 569\nSection Inlines / Links\n");
}
// Here, though, `[foo][bar]` is parsed as a reference, since
// `[bar]` is defined:
[Test]
- public void InlinesLinks_Example569()
+ public void InlinesLinks_Example570()
{
- // Example 569
+ // Example 570
// Section: Inlines / Links
//
// The following Markdown:
@@ -12793,15 +12814,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foobaz
- TestParser.TestSpec("[foo][bar][baz]\n\n[baz]: /url1\n[bar]: /url2", "foobaz
", "", context: "Example 569\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo][bar][baz]\n\n[baz]: /url1\n[bar]: /url2", "foobaz
", "", context: "Example 570\nSection Inlines / Links\n");
}
// Here `[foo]` is not parsed as a shortcut reference, because it
// is followed by a link label (even though `[bar]` is not defined):
[Test]
- public void InlinesLinks_Example570()
+ public void InlinesLinks_Example571()
{
- // Example 570
+ // Example 571
// Section: Inlines / Links
//
// The following Markdown:
@@ -12813,7 +12834,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// [foo]bar
- TestParser.TestSpec("[foo][bar][baz]\n\n[baz]: /url1\n[foo]: /url2", "[foo]bar
", "", context: "Example 570\nSection Inlines / Links\n");
+ TestParser.TestSpec("[foo][bar][baz]\n\n[baz]: /url1\n[foo]: /url2", "[foo]bar
", "", context: "Example 571\nSection Inlines / Links\n");
}
}
@@ -12832,9 +12853,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// as its contents. When an image is rendered to HTML,
// this is standardly used as the image's `alt` attribute.
[Test]
- public void InlinesImages_Example571()
+ public void InlinesImages_Example572()
{
- // Example 571
+ // Example 572
// Section: Inlines / Images
//
// The following Markdown:
@@ -12843,13 +12864,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("", "
", "", context: "Example 571\nSection Inlines / Images\n");
+ TestParser.TestSpec("", "
", "", context: "Example 572\nSection Inlines / Images\n");
}
[Test]
- public void InlinesImages_Example572()
+ public void InlinesImages_Example573()
{
- // Example 572
+ // Example 573
// Section: Inlines / Images
//
// The following Markdown:
@@ -12860,22 +12881,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("![foo *bar*]\n\n[foo *bar*]: train.jpg \"train & tracks\"", "
", "", context: "Example 572\nSection Inlines / Images\n");
- }
-
- [Test]
- public void InlinesImages_Example573()
- {
- // Example 573
- // Section: Inlines / Images
- //
- // The following Markdown:
- // ](/url2)
- //
- // Should be rendered as:
- // 
-
- TestParser.TestSpec("](/url2)", "
", "", context: "Example 573\nSection Inlines / Images\n");
+ TestParser.TestSpec("![foo *bar*]\n\n[foo *bar*]: train.jpg \"train & tracks\"", "
", "", context: "Example 573\nSection Inlines / Images\n");
}
[Test]
@@ -12885,12 +12891,27 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Images
//
// The following Markdown:
+ // ](/url2)
+ //
+ // Should be rendered as:
+ // 
+
+ TestParser.TestSpec("](/url2)", "
", "", context: "Example 574\nSection Inlines / Images\n");
+ }
+
+ [Test]
+ public void InlinesImages_Example575()
+ {
+ // Example 575
+ // Section: Inlines / Images
+ //
+ // The following Markdown:
// ](/url2)
//
// Should be rendered as:
// 
- TestParser.TestSpec("](/url2)", "
", "", context: "Example 574\nSection Inlines / Images\n");
+ TestParser.TestSpec("](/url2)", "
", "", context: "Example 575\nSection Inlines / Images\n");
}
// Though this spec is concerned with parsing, not rendering, it is
@@ -12900,9 +12921,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// [bar](/url)` or `foo bar`. Only the plain string
// content is rendered, without formatting.
[Test]
- public void InlinesImages_Example575()
+ public void InlinesImages_Example576()
{
- // Example 575
+ // Example 576
// Section: Inlines / Images
//
// The following Markdown:
@@ -12913,13 +12934,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"", "
", "", context: "Example 575\nSection Inlines / Images\n");
+ TestParser.TestSpec("![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"", "
", "", context: "Example 576\nSection Inlines / Images\n");
}
[Test]
- public void InlinesImages_Example576()
+ public void InlinesImages_Example577()
{
- // Example 576
+ // Example 577
// Section: Inlines / Images
//
// The following Markdown:
@@ -12930,22 +12951,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"", "
", "", context: "Example 576\nSection Inlines / Images\n");
- }
-
- [Test]
- public void InlinesImages_Example577()
- {
- // Example 577
- // Section: Inlines / Images
- //
- // The following Markdown:
- // 
- //
- // Should be rendered as:
- // 
-
- TestParser.TestSpec("", "
", "", context: "Example 577\nSection Inlines / Images\n");
+ TestParser.TestSpec("![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"", "
", "", context: "Example 577\nSection Inlines / Images\n");
}
[Test]
@@ -12955,12 +12961,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Images
//
// The following Markdown:
- // My 
+ // 
//
// Should be rendered as:
- // My 
+ // 
- TestParser.TestSpec("My ", "My 
", "", context: "Example 578\nSection Inlines / Images\n");
+ TestParser.TestSpec("", "
", "", context: "Example 578\nSection Inlines / Images\n");
}
[Test]
@@ -12970,12 +12976,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Images
//
// The following Markdown:
- // ![foo]()
+ // My 
//
// Should be rendered as:
- // 
+ // My 
- TestParser.TestSpec("![foo]()", "
", "", context: "Example 579\nSection Inlines / Images\n");
+ TestParser.TestSpec("My ", "My 
", "", context: "Example 579\nSection Inlines / Images\n");
}
[Test]
@@ -12985,19 +12991,34 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Images
//
// The following Markdown:
+ // ![foo]()
+ //
+ // Should be rendered as:
+ // 
+
+ TestParser.TestSpec("![foo]()", "
", "", context: "Example 580\nSection Inlines / Images\n");
+ }
+
+ [Test]
+ public void InlinesImages_Example581()
+ {
+ // Example 581
+ // Section: Inlines / Images
+ //
+ // The following Markdown:
// 
//
// Should be rendered as:
// 
- TestParser.TestSpec("", "
", "", context: "Example 580\nSection Inlines / Images\n");
+ TestParser.TestSpec("", "
", "", context: "Example 581\nSection Inlines / Images\n");
}
// Reference-style:
[Test]
- public void InlinesImages_Example581()
+ public void InlinesImages_Example582()
{
- // Example 581
+ // Example 582
// Section: Inlines / Images
//
// The following Markdown:
@@ -13008,13 +13029,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("![foo][bar]\n\n[bar]: /url", "
", "", context: "Example 581\nSection Inlines / Images\n");
+ TestParser.TestSpec("![foo][bar]\n\n[bar]: /url", "
", "", context: "Example 582\nSection Inlines / Images\n");
}
[Test]
- public void InlinesImages_Example582()
+ public void InlinesImages_Example583()
{
- // Example 582
+ // Example 583
// Section: Inlines / Images
//
// The following Markdown:
@@ -13025,14 +13046,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("![foo][bar]\n\n[BAR]: /url", "
", "", context: "Example 582\nSection Inlines / Images\n");
+ TestParser.TestSpec("![foo][bar]\n\n[BAR]: /url", "
", "", context: "Example 583\nSection Inlines / Images\n");
}
// Collapsed:
[Test]
- public void InlinesImages_Example583()
+ public void InlinesImages_Example584()
{
- // Example 583
+ // Example 584
// Section: Inlines / Images
//
// The following Markdown:
@@ -13043,13 +13064,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("![foo][]\n\n[foo]: /url \"title\"", "
", "", context: "Example 583\nSection Inlines / Images\n");
+ TestParser.TestSpec("![foo][]\n\n[foo]: /url \"title\"", "
", "", context: "Example 584\nSection Inlines / Images\n");
}
[Test]
- public void InlinesImages_Example584()
+ public void InlinesImages_Example585()
{
- // Example 584
+ // Example 585
// Section: Inlines / Images
//
// The following Markdown:
@@ -13060,14 +13081,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("![*foo* bar][]\n\n[*foo* bar]: /url \"title\"", "
", "", context: "Example 584\nSection Inlines / Images\n");
+ TestParser.TestSpec("![*foo* bar][]\n\n[*foo* bar]: /url \"title\"", "
", "", context: "Example 585\nSection Inlines / Images\n");
}
// The labels are case-insensitive:
[Test]
- public void InlinesImages_Example585()
+ public void InlinesImages_Example586()
{
- // Example 585
+ // Example 586
// Section: Inlines / Images
//
// The following Markdown:
@@ -13078,15 +13099,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("![Foo][]\n\n[foo]: /url \"title\"", "
", "", context: "Example 585\nSection Inlines / Images\n");
+ TestParser.TestSpec("![Foo][]\n\n[foo]: /url \"title\"", "
", "", context: "Example 586\nSection Inlines / Images\n");
}
// As with reference links, spaces, tabs, and line endings, are not allowed
// between the two sets of brackets:
[Test]
- public void InlinesImages_Example586()
+ public void InlinesImages_Example587()
{
- // Example 586
+ // Example 587
// Section: Inlines / Images
//
// The following Markdown:
@@ -13099,14 +13120,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
//
// []
- TestParser.TestSpec("![foo] \n[]\n\n[foo]: /url \"title\"", "
\n[]
", "", context: "Example 586\nSection Inlines / Images\n");
+ TestParser.TestSpec("![foo] \n[]\n\n[foo]: /url \"title\"", "
\n[]
", "", context: "Example 587\nSection Inlines / Images\n");
}
// Shortcut:
[Test]
- public void InlinesImages_Example587()
+ public void InlinesImages_Example588()
{
- // Example 587
+ // Example 588
// Section: Inlines / Images
//
// The following Markdown:
@@ -13117,13 +13138,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("![foo]\n\n[foo]: /url \"title\"", "
", "", context: "Example 587\nSection Inlines / Images\n");
+ TestParser.TestSpec("![foo]\n\n[foo]: /url \"title\"", "
", "", context: "Example 588\nSection Inlines / Images\n");
}
[Test]
- public void InlinesImages_Example588()
+ public void InlinesImages_Example589()
{
- // Example 588
+ // Example 589
// Section: Inlines / Images
//
// The following Markdown:
@@ -13134,14 +13155,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("![*foo* bar]\n\n[*foo* bar]: /url \"title\"", "
", "", context: "Example 588\nSection Inlines / Images\n");
+ TestParser.TestSpec("![*foo* bar]\n\n[*foo* bar]: /url \"title\"", "
", "", context: "Example 589\nSection Inlines / Images\n");
}
// Note that link labels cannot contain unescaped brackets:
[Test]
- public void InlinesImages_Example589()
+ public void InlinesImages_Example590()
{
- // Example 589
+ // Example 590
// Section: Inlines / Images
//
// The following Markdown:
@@ -13153,14 +13174,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// ![[foo]]
// [[foo]]: /url "title"
- TestParser.TestSpec("![[foo]]\n\n[[foo]]: /url \"title\"", "![[foo]]
\n[[foo]]: /url "title"
", "", context: "Example 589\nSection Inlines / Images\n");
+ TestParser.TestSpec("![[foo]]\n\n[[foo]]: /url \"title\"", "![[foo]]
\n[[foo]]: /url "title"
", "", context: "Example 590\nSection Inlines / Images\n");
}
// The link labels are case-insensitive:
[Test]
- public void InlinesImages_Example590()
+ public void InlinesImages_Example591()
{
- // Example 590
+ // Example 591
// Section: Inlines / Images
//
// The following Markdown:
@@ -13171,15 +13192,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// 
- TestParser.TestSpec("![Foo]\n\n[foo]: /url \"title\"", "
", "", context: "Example 590\nSection Inlines / Images\n");
+ TestParser.TestSpec("![Foo]\n\n[foo]: /url \"title\"", "
", "", context: "Example 591\nSection Inlines / Images\n");
}
// If you just want a literal `!` followed by bracketed text, you can
// backslash-escape the opening `[`:
[Test]
- public void InlinesImages_Example591()
+ public void InlinesImages_Example592()
{
- // Example 591
+ // Example 592
// Section: Inlines / Images
//
// The following Markdown:
@@ -13190,15 +13211,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// ![foo]
- TestParser.TestSpec("!\\[foo]\n\n[foo]: /url \"title\"", "![foo]
", "", context: "Example 591\nSection Inlines / Images\n");
+ TestParser.TestSpec("!\\[foo]\n\n[foo]: /url \"title\"", "![foo]
", "", context: "Example 592\nSection Inlines / Images\n");
}
// If you want a link after a literal `!`, backslash-escape the
// `!`:
[Test]
- public void InlinesImages_Example592()
+ public void InlinesImages_Example593()
{
- // Example 592
+ // Example 593
// Section: Inlines / Images
//
// The following Markdown:
@@ -13209,7 +13230,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// !foo
- TestParser.TestSpec("\\![foo]\n\n[foo]: /url \"title\"", "!foo
", "", context: "Example 592\nSection Inlines / Images\n");
+ TestParser.TestSpec("\\![foo]\n\n[foo]: /url \"title\"", "!foo
", "", context: "Example 593\nSection Inlines / Images\n");
}
}
@@ -13240,9 +13261,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
//
// Here are some valid autolinks:
[Test]
- public void InlinesAutolinks_Example593()
+ public void InlinesAutolinks_Example594()
{
- // Example 593
+ // Example 594
// Section: Inlines / Autolinks
//
// The following Markdown:
@@ -13251,22 +13272,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// http://foo.bar.baz
- TestParser.TestSpec("", "http://foo.bar.baz
", "", context: "Example 593\nSection Inlines / Autolinks\n");
- }
-
- [Test]
- public void InlinesAutolinks_Example594()
- {
- // Example 594
- // Section: Inlines / Autolinks
- //
- // The following Markdown:
- //
- //
- // Should be rendered as:
- // http://foo.bar.baz/test?q=hello&id=22&boolean
-
- TestParser.TestSpec("", "http://foo.bar.baz/test?q=hello&id=22&boolean
", "", context: "Example 594\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "http://foo.bar.baz
", "", context: "Example 594\nSection Inlines / Autolinks\n");
}
[Test]
@@ -13276,19 +13282,34 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Autolinks
//
// The following Markdown:
+ //
+ //
+ // Should be rendered as:
+ // https://foo.bar.baz/test?q=hello&id=22&boolean
+
+ TestParser.TestSpec("", "https://foo.bar.baz/test?q=hello&id=22&boolean
", "", context: "Example 595\nSection Inlines / Autolinks\n");
+ }
+
+ [Test]
+ public void InlinesAutolinks_Example596()
+ {
+ // Example 596
+ // Section: Inlines / Autolinks
+ //
+ // The following Markdown:
//
//
// Should be rendered as:
// irc://foo.bar:2233/baz
- TestParser.TestSpec("", "irc://foo.bar:2233/baz
", "", context: "Example 595\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "irc://foo.bar:2233/baz
", "", context: "Example 596\nSection Inlines / Autolinks\n");
}
// Uppercase is also fine:
[Test]
- public void InlinesAutolinks_Example596()
+ public void InlinesAutolinks_Example597()
{
- // Example 596
+ // Example 597
// Section: Inlines / Autolinks
//
// The following Markdown:
@@ -13297,7 +13318,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// MAILTO:FOO@BAR.BAZ
- TestParser.TestSpec("", "MAILTO:FOO@BAR.BAZ
", "", context: "Example 596\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "MAILTO:FOO@BAR.BAZ
", "", context: "Example 597\nSection Inlines / Autolinks\n");
}
// Note that many strings that count as [absolute URIs] for
@@ -13305,9 +13326,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// schemes are not registered or because of other problems
// with their syntax:
[Test]
- public void InlinesAutolinks_Example597()
+ public void InlinesAutolinks_Example598()
{
- // Example 597
+ // Example 598
// Section: Inlines / Autolinks
//
// The following Markdown:
@@ -13316,22 +13337,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// a+b+c:d
- TestParser.TestSpec("", "a+b+c:d
", "", context: "Example 597\nSection Inlines / Autolinks\n");
- }
-
- [Test]
- public void InlinesAutolinks_Example598()
- {
- // Example 598
- // Section: Inlines / Autolinks
- //
- // The following Markdown:
- //
- //
- // Should be rendered as:
- // made-up-scheme://foo,bar
-
- TestParser.TestSpec("", "made-up-scheme://foo,bar
", "", context: "Example 598\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "a+b+c:d
", "", context: "Example 598\nSection Inlines / Autolinks\n");
}
[Test]
@@ -13341,12 +13347,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Autolinks
//
// The following Markdown:
- //
+ //
//
// Should be rendered as:
- // http://../
+ // made-up-scheme://foo,bar
- TestParser.TestSpec("", "http://../
", "", context: "Example 599\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "made-up-scheme://foo,bar
", "", context: "Example 599\nSection Inlines / Autolinks\n");
}
[Test]
@@ -13356,15 +13362,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Autolinks
//
// The following Markdown:
- //
+ //
//
// Should be rendered as:
- // localhost:5001/foo
+ // https://../
- TestParser.TestSpec("", "localhost:5001/foo
", "", context: "Example 600\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "https://../
", "", context: "Example 600\nSection Inlines / Autolinks\n");
}
- // Spaces are not allowed in autolinks:
[Test]
public void InlinesAutolinks_Example601()
{
@@ -13372,15 +13377,15 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Autolinks
//
// The following Markdown:
- //
+ //
//
// Should be rendered as:
- // <http://foo.bar/baz bim>
+ // localhost:5001/foo
- TestParser.TestSpec("", "<http://foo.bar/baz bim>
", "", context: "Example 601\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "localhost:5001/foo
", "", context: "Example 601\nSection Inlines / Autolinks\n");
}
- // Backslash-escapes do not work inside autolinks:
+ // Spaces are not allowed in autolinks:
[Test]
public void InlinesAutolinks_Example602()
{
@@ -13388,12 +13393,28 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Autolinks
//
// The following Markdown:
- //
+ //
//
// Should be rendered as:
- // http://example.com/\[\
+ // <https://foo.bar/baz bim>
- TestParser.TestSpec("", "http://example.com/\\[\\
", "", context: "Example 602\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "<https://foo.bar/baz bim>
", "", context: "Example 602\nSection Inlines / Autolinks\n");
+ }
+
+ // Backslash-escapes do not work inside autolinks:
+ [Test]
+ public void InlinesAutolinks_Example603()
+ {
+ // Example 603
+ // Section: Inlines / Autolinks
+ //
+ // The following Markdown:
+ //
+ //
+ // Should be rendered as:
+ // https://example.com/\[\
+
+ TestParser.TestSpec("", "https://example.com/\\[\\
", "", context: "Example 603\nSection Inlines / Autolinks\n");
}
// An [email autolink](@)
@@ -13411,9 +13432,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
//
// Examples of email autolinks:
[Test]
- public void InlinesAutolinks_Example603()
+ public void InlinesAutolinks_Example604()
{
- // Example 603
+ // Example 604
// Section: Inlines / Autolinks
//
// The following Markdown:
@@ -13422,13 +13443,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo@bar.example.com
- TestParser.TestSpec("", "foo@bar.example.com
", "", context: "Example 603\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "foo@bar.example.com
", "", context: "Example 604\nSection Inlines / Autolinks\n");
}
[Test]
- public void InlinesAutolinks_Example604()
+ public void InlinesAutolinks_Example605()
{
- // Example 604
+ // Example 605
// Section: Inlines / Autolinks
//
// The following Markdown:
@@ -13437,14 +13458,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// foo+special@Bar.baz-bar0.com
- TestParser.TestSpec("", "foo+special@Bar.baz-bar0.com
", "", context: "Example 604\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "foo+special@Bar.baz-bar0.com
", "", context: "Example 605\nSection Inlines / Autolinks\n");
}
// Backslash-escapes do not work inside email autolinks:
[Test]
- public void InlinesAutolinks_Example605()
+ public void InlinesAutolinks_Example606()
{
- // Example 605
+ // Example 606
// Section: Inlines / Autolinks
//
// The following Markdown:
@@ -13453,14 +13474,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// <foo+@bar.example.com>
- TestParser.TestSpec("", "<foo+@bar.example.com>
", "", context: "Example 605\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "<foo+@bar.example.com>
", "", context: "Example 606\nSection Inlines / Autolinks\n");
}
// These are not autolinks:
[Test]
- public void InlinesAutolinks_Example606()
+ public void InlinesAutolinks_Example607()
{
- // Example 606
+ // Example 607
// Section: Inlines / Autolinks
//
// The following Markdown:
@@ -13469,22 +13490,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// <>
- TestParser.TestSpec("<>", "<>
", "", context: "Example 606\nSection Inlines / Autolinks\n");
- }
-
- [Test]
- public void InlinesAutolinks_Example607()
- {
- // Example 607
- // Section: Inlines / Autolinks
- //
- // The following Markdown:
- // < http://foo.bar >
- //
- // Should be rendered as:
- // < http://foo.bar >
-
- TestParser.TestSpec("< http://foo.bar >", "< http://foo.bar >
", "", context: "Example 607\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("<>", "<>
", "", context: "Example 607\nSection Inlines / Autolinks\n");
}
[Test]
@@ -13494,12 +13500,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Autolinks
//
// The following Markdown:
- //
+ // < https://foo.bar >
//
// Should be rendered as:
- // <m:abc>
+ // < https://foo.bar >
- TestParser.TestSpec("", "<m:abc>
", "", context: "Example 608\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("< https://foo.bar >", "< https://foo.bar >
", "", context: "Example 608\nSection Inlines / Autolinks\n");
}
[Test]
@@ -13509,12 +13515,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Autolinks
//
// The following Markdown:
- //
+ //
//
// Should be rendered as:
- // <foo.bar.baz>
+ // <m:abc>
- TestParser.TestSpec("", "<foo.bar.baz>
", "", context: "Example 609\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "<m:abc>
", "", context: "Example 609\nSection Inlines / Autolinks\n");
}
[Test]
@@ -13524,12 +13530,12 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Autolinks
//
// The following Markdown:
- // http://example.com
+ //
//
// Should be rendered as:
- // http://example.com
+ // <foo.bar.baz>
- TestParser.TestSpec("http://example.com", "http://example.com
", "", context: "Example 610\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("", "<foo.bar.baz>
", "", context: "Example 610\nSection Inlines / Autolinks\n");
}
[Test]
@@ -13539,12 +13545,27 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Autolinks
//
// The following Markdown:
+ // https://example.com
+ //
+ // Should be rendered as:
+ // https://example.com
+
+ TestParser.TestSpec("https://example.com", "https://example.com
", "", context: "Example 611\nSection Inlines / Autolinks\n");
+ }
+
+ [Test]
+ public void InlinesAutolinks_Example612()
+ {
+ // Example 612
+ // Section: Inlines / Autolinks
+ //
+ // The following Markdown:
// foo@bar.example.com
//
// Should be rendered as:
// foo@bar.example.com
- TestParser.TestSpec("foo@bar.example.com", "foo@bar.example.com
", "", context: "Example 611\nSection Inlines / Autolinks\n");
+ TestParser.TestSpec("foo@bar.example.com", "foo@bar.example.com
", "", context: "Example 612\nSection Inlines / Autolinks\n");
}
}
@@ -13602,10 +13623,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// [tag name], optional spaces, tabs, and up to one line ending, and the character
// `>`.
//
- // An [HTML comment](@) consists of ``,
- // where *text* does not start with `>` or `->`, does not end with `-`,
- // and does not contain `--`. (See the
- // [HTML5 spec](http://www.w3.org/TR/html5/syntax.html#comments).)
+ // An [HTML comment](@) consists of ``, ``, or ``, and `-->` (see the
+ // [HTML spec](https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state)).
//
// A [processing instruction](@)
// consists of the string ``, a string
@@ -13625,9 +13645,9 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
//
// Here are some simple open tags:
[Test]
- public void InlinesRawHTML_Example612()
+ public void InlinesRawHTML_Example613()
{
- // Example 612
+ // Example 613
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13636,14 +13656,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
//
- TestParser.TestSpec("", "
", "", context: "Example 612\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("", "
", "", context: "Example 613\nSection Inlines / Raw HTML\n");
}
// Empty elements:
[Test]
- public void InlinesRawHTML_Example613()
+ public void InlinesRawHTML_Example614()
{
- // Example 613
+ // Example 614
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13652,14 +13672,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
//
- TestParser.TestSpec("", "
", "", context: "Example 613\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("", "
", "", context: "Example 614\nSection Inlines / Raw HTML\n");
}
// Whitespace is allowed:
[Test]
- public void InlinesRawHTML_Example614()
+ public void InlinesRawHTML_Example615()
{
- // Example 614
+ // Example 615
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13670,14 +13690,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
//
- TestParser.TestSpec("", "
", "", context: "Example 614\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("", "
", "", context: "Example 615\nSection Inlines / Raw HTML\n");
}
// With attributes:
[Test]
- public void InlinesRawHTML_Example615()
+ public void InlinesRawHTML_Example616()
{
- // Example 615
+ // Example 616
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13688,14 +13708,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
//
- TestParser.TestSpec("", "
", "", context: "Example 615\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("", "
", "", context: "Example 616\nSection Inlines / Raw HTML\n");
}
// Custom tag names can be used:
[Test]
- public void InlinesRawHTML_Example616()
+ public void InlinesRawHTML_Example617()
{
- // Example 616
+ // Example 617
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13704,14 +13724,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// Foo
- TestParser.TestSpec("Foo ", "Foo
", "", context: "Example 616\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("Foo ", "Foo
", "", context: "Example 617\nSection Inlines / Raw HTML\n");
}
// Illegal tag names, not parsed as HTML:
[Test]
- public void InlinesRawHTML_Example617()
+ public void InlinesRawHTML_Example618()
{
- // Example 617
+ // Example 618
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13720,14 +13740,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// <33> <__>
- TestParser.TestSpec("<33> <__>", "<33> <__>
", "", context: "Example 617\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("<33> <__>", "<33> <__>
", "", context: "Example 618\nSection Inlines / Raw HTML\n");
}
// Illegal attribute names:
[Test]
- public void InlinesRawHTML_Example618()
+ public void InlinesRawHTML_Example619()
{
- // Example 618
+ // Example 619
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13736,14 +13756,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// <a h*#ref="hi">
- TestParser.TestSpec("", "<a h*#ref="hi">
", "", context: "Example 618\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("", "<a h*#ref="hi">
", "", context: "Example 619\nSection Inlines / Raw HTML\n");
}
// Illegal attribute values:
[Test]
- public void InlinesRawHTML_Example619()
+ public void InlinesRawHTML_Example620()
{
- // Example 619
+ // Example 620
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13752,14 +13772,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// <a href="hi'> <a href=hi'>
- TestParser.TestSpec(" ", "<a href="hi'> <a href=hi'>
", "", context: "Example 619\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec(" ", "<a href="hi'> <a href=hi'>
", "", context: "Example 620\nSection Inlines / Raw HTML\n");
}
// Illegal whitespace:
[Test]
- public void InlinesRawHTML_Example620()
+ public void InlinesRawHTML_Example621()
{
- // Example 620
+ // Example 621
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13774,14 +13794,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// <foo bar=baz
// bim!bop />
- TestParser.TestSpec("< a><\nfoo>\n", "< a><\nfoo><bar/ >\n<foo bar=baz\nbim!bop />
", "", context: "Example 620\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("< a><\nfoo>\n", "< a><\nfoo><bar/ >\n<foo bar=baz\nbim!bop />
", "", context: "Example 621\nSection Inlines / Raw HTML\n");
}
// Missing whitespace:
[Test]
- public void InlinesRawHTML_Example621()
+ public void InlinesRawHTML_Example622()
{
- // Example 621
+ // Example 622
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13790,14 +13810,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// <a href='bar'title=title>
- TestParser.TestSpec("", "<a href='bar'title=title>
", "", context: "Example 621\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("", "<a href='bar'title=title>
", "", context: "Example 622\nSection Inlines / Raw HTML\n");
}
// Closing tags:
[Test]
- public void InlinesRawHTML_Example622()
+ public void InlinesRawHTML_Example623()
{
- // Example 622
+ // Example 623
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13806,14 +13826,14 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
//
- TestParser.TestSpec("", "", "", context: "Example 622\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("", "", "", context: "Example 623\nSection Inlines / Raw HTML\n");
}
// Illegal attributes in closing tag:
[Test]
- public void InlinesRawHTML_Example623()
+ public void InlinesRawHTML_Example624()
{
- // Example 623
+ // Example 624
// Section: Inlines / Raw HTML
//
// The following Markdown:
@@ -13822,27 +13842,10 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Should be rendered as:
// </a href="foo">
- TestParser.TestSpec("", "</a href="foo">
", "", context: "Example 623\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("", "</a href="foo">
", "", context: "Example 624\nSection Inlines / Raw HTML\n");
}
// Comments:
- [Test]
- public void InlinesRawHTML_Example624()
- {
- // Example 624
- // Section: Inlines / Raw HTML
- //
- // The following Markdown:
- // foo
- //
- // Should be rendered as:
- // foo
-
- TestParser.TestSpec("foo ", "foo
", "", context: "Example 624\nSection Inlines / Raw HTML\n");
- }
-
[Test]
public void InlinesRawHTML_Example625()
{
@@ -13850,15 +13853,16 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// Section: Inlines / Raw HTML
//
// The following Markdown:
- // foo
+ // foo
//
// Should be rendered as:
- // foo <!-- not a comment -- two hyphens -->
+ // foo
- TestParser.TestSpec("foo ", "foo <!-- not a comment -- two hyphens -->
", "", context: "Example 625\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("foo ", "foo
", "", context: "Example 625\nSection Inlines / Raw HTML\n");
}
- // Not comments:
[Test]
public void InlinesRawHTML_Example626()
{
@@ -13868,13 +13872,13 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// The following Markdown:
// foo foo -->
//
- // foo
+ // foo foo -->
//
// Should be rendered as:
- // foo <!--> foo -->
- // foo <!-- foo--->
+ // foo foo -->
+ // foo foo -->
- TestParser.TestSpec("foo foo -->\n\nfoo ", "foo <!--> foo -->
\nfoo <!-- foo--->
", "", context: "Example 626\nSection Inlines / Raw HTML\n");
+ TestParser.TestSpec("foo foo -->\n\nfoo foo -->", "foo foo -->
\nfoo foo -->
", "", context: "Example 626\nSection Inlines / Raw HTML\n");
}
// Processing instructions:
@@ -14604,7 +14608,7 @@ namespace Markdig.Tests.Specs.CommonMarkSpecs
// delimiter from the stack, and return a literal text node `]`.
//
// - If we find one and it's active, then we parse ahead to see if
- // we have an inline link/image, reference link/image, compact reference
+ // we have an inline link/image, reference link/image, collapsed reference
// link/image, or shortcut reference link/image.
//
// + If we don't, then we remove the opening delimiter from the
diff --git a/src/Markdig.Tests/Specs/CommonMark.md b/src/Markdig.Tests/Specs/CommonMark.md
index 23f7ee04..f1fab281 100644
--- a/src/Markdig.Tests/Specs/CommonMark.md
+++ b/src/Markdig.Tests/Specs/CommonMark.md
@@ -1,9 +1,9 @@
---
title: CommonMark Spec
author: John MacFarlane
-version: '0.30'
-date: '2021-06-19'
-license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)'
+version: '0.31.2'
+date: '2024-01-28'
+license: '[CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)'
...
# Introduction
@@ -14,7 +14,7 @@ Markdown is a plain text format for writing structured documents,
based on conventions for indicating formatting in email
and usenet posts. It was developed by John Gruber (with
help from Aaron Swartz) and released in 2004 in the form of a
-[syntax description](http://daringfireball.net/projects/markdown/syntax)
+[syntax description](https://daringfireball.net/projects/markdown/syntax)
and a Perl script (`Markdown.pl`) for converting Markdown to
HTML. In the next decade, dozens of implementations were
developed in many languages. Some extended the original
@@ -34,10 +34,10 @@ As Gruber writes:
> Markdown-formatted document should be publishable as-is, as
> plain text, without looking like it's been marked up with tags
> or formatting instructions.
-> ()
+> ()
The point can be illustrated by comparing a sample of
-[AsciiDoc](http://www.methods.co.nz/asciidoc/) with
+[AsciiDoc](https://asciidoc.org/) with
an equivalent sample of Markdown. Here is a sample of
AsciiDoc from the AsciiDoc manual:
@@ -103,7 +103,7 @@ source, not just in the processed document.
## Why is a spec needed?
John Gruber's [canonical description of Markdown's
-syntax](http://daringfireball.net/projects/markdown/syntax)
+syntax](https://daringfireball.net/projects/markdown/syntax)
does not specify the syntax unambiguously. Here are some examples of
questions it does not answer:
@@ -316,9 +316,9 @@ A line containing no characters, or a line containing only spaces
The following definitions of character classes will be used in this spec:
-A [Unicode whitespace character](@) is
-any code point in the Unicode `Zs` general category, or a tab (`U+0009`),
-line feed (`U+000A`), form feed (`U+000C`), or carriage return (`U+000D`).
+A [Unicode whitespace character](@) is a character in the Unicode `Zs` general
+category, or a tab (`U+0009`), line feed (`U+000A`), form feed (`U+000C`), or
+carriage return (`U+000D`).
[Unicode whitespace](@) is a sequence of one or more
[Unicode whitespace characters].
@@ -337,9 +337,8 @@ is `!`, `"`, `#`, `$`, `%`, `&`, `'`, `(`, `)`,
`[`, `\`, `]`, `^`, `_`, `` ` `` (U+005B–0060),
`{`, `|`, `}`, or `~` (U+007B–007E).
-A [Unicode punctuation character](@) is an [ASCII
-punctuation character] or anything in
-the general Unicode categories `Pc`, `Pd`, `Pe`, `Pf`, `Pi`, `Po`, or `Ps`.
+A [Unicode punctuation character](@) is a character in the Unicode `P`
+(puncuation) or `S` (symbol) general categories.
## Tabs
@@ -579,9 +578,9 @@ raw HTML:
```````````````````````````````` example
-
+
.
-http://example.com?find=\*
+https://example.com?find=\*
````````````````````````````````
@@ -1964,7 +1963,7 @@ has been found, the code block contains all of the lines after the
opening code fence until the end of the containing block (or
document). (An alternative spec would require backtracking in the
event that a closing code fence is not found. But this makes parsing
-much less efficient, and there seems to be no real down side to the
+much less efficient, and there seems to be no real downside to the
behavior described here.)
A fenced code block may interrupt a paragraph, and does not require
@@ -2403,7 +2402,7 @@ followed by one of the strings (case-insensitive) `address`,
`h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `head`, `header`, `hr`,
`html`, `iframe`, `legend`, `li`, `link`, `main`, `menu`, `menuitem`,
`nav`, `noframes`, `ol`, `optgroup`, `option`, `p`, `param`,
-`section`, `source`, `summary`, `table`, `tbody`, `td`,
+`search`, `section`, `summary`, `table`, `tbody`, `td`,
`tfoot`, `th`, `thead`, `title`, `tr`, `track`, `ul`, followed
by a space, a tab, the end of the line, the string `>`, or
the string `/>`.\
@@ -4115,7 +4114,7 @@ The following rules define [list items]:
blocks *Bs* starting with a character other than a space or tab, and *M* is
a list marker of width *W* followed by 1 ≤ *N* ≤ 4 spaces of indentation,
then the result of prepending *M* and the following spaces to the first line
- of Ls*, and indenting subsequent lines of *Ls* by *W + N* spaces, is a
+ of *Ls*, and indenting subsequent lines of *Ls* by *W + N* spaces, is a
list item with *Bs* as its contents. The type of the list item
(bullet or ordered) is determined by the type of its list marker.
If the list item is ordered, then it is also assigned a start
@@ -5350,11 +5349,11 @@ by itself should be a paragraph followed by a nested sublist.
Since it is well established Markdown practice to allow lists to
interrupt paragraphs inside list items, the [principle of
uniformity] requires us to allow this outside list items as
-well. ([reStructuredText](http://docutils.sourceforge.net/rst.html)
+well. ([reStructuredText](https://docutils.sourceforge.net/rst.html)
takes a different approach, requiring blank lines before lists
even inside other list items.)
-In order to solve of unwanted lists in paragraphs with
+In order to solve the problem of unwanted lists in paragraphs with
hard-wrapped numerals, we allow only lists starting with `1` to
interrupt paragraphs. Thus,
@@ -6055,18 +6054,18 @@ But this is an HTML tag:
And this is code:
```````````````````````````````` example
-``
+``
.
-<http://foo.bar.baz>`
+<https://foo.bar.baz>`
````````````````````````````````
But this is an autolink:
```````````````````````````````` example
-`
+`
.
-http://foo.bar.`baz`
+https://foo.bar.`baz`
````````````````````````````````
@@ -6099,7 +6098,7 @@ closing backtick strings to be equal in length:
## Emphasis and strong emphasis
John Gruber's original [Markdown syntax
-description](http://daringfireball.net/projects/markdown/syntax#em) says:
+description](https://daringfireball.net/projects/markdown/syntax#em) says:
> Markdown treats asterisks (`*`) and underscores (`_`) as indicators of
> emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML
@@ -6201,7 +6200,7 @@ Here are some examples of delimiter runs.
(The idea of distinguishing left-flanking and right-flanking
delimiter runs based on the character before and the character
after comes from Roopesh Chander's
-[vfmd](http://www.vfmd.org/vfmd-spec/specification/#procedure-for-identifying-emphasis-tags).
+[vfmd](https://web.archive.org/web/20220608143320/http://www.vfmd.org/vfmd-spec/specification/#procedure-for-identifying-emphasis-tags).
vfmd uses the terminology "emphasis indicator string" instead of "delimiter
run," and its rules for distinguishing left- and right-flanking runs
are a bit more complex than the ones given here.)
@@ -6343,6 +6342,21 @@ Unicode nonbreaking spaces count as whitespace, too:
````````````````````````````````
+Unicode symbols count as punctuation, too:
+
+```````````````````````````````` example
+*$*alpha.
+
+*£*bravo.
+
+*€*charlie.
+.
+*$*alpha.
+*£*bravo.
+*€*charlie.
+````````````````````````````````
+
+
Intraword emphasis with `*` is permitted:
```````````````````````````````` example
@@ -7428,16 +7442,16 @@ _a `_`_
```````````````````````````````` example
-**a
+**a
.
-**ahttp://foo.bar/?q=**
+**ahttps://foo.bar/?q=**
````````````````````````````````
```````````````````````````````` example
-__a
+__a
.
-__ahttp://foo.bar/?q=__
+__ahttps://foo.bar/?q=__
````````````````````````````````
@@ -7685,13 +7699,13 @@ A link can contain fragment identifiers and queries:
```````````````````````````````` example
[link](#fragment)
-[link](http://example.com#fragment)
+[link](https://example.com#fragment)
-[link](http://example.com?foo=3#frag)
+[link](https://example.com?foo=3#frag)
.
link
-link
-link
+link
+link
````````````````````````````````
@@ -7935,9 +7949,9 @@ and autolinks over link grouping:
```````````````````````````````` example
-[foo
+[foo
.
-[foohttp://example.com/?search=](uri)
+[foohttps://example.com/?search=](uri)
````````````````````````````````
@@ -8091,11 +8105,11 @@ and autolinks over link grouping:
```````````````````````````````` example
-[foo
+[foo
[ref]: /uri
.
-[foohttp://example.com/?search=][ref]
+[foohttps://example.com/?search=][ref]
````````````````````````````````
@@ -8295,7 +8309,7 @@ A [collapsed reference link](@)
consists of a [link label] that [matches] a
[link reference definition] elsewhere in the
document, followed by the string `[]`.
-The contents of the first link label are parsed as inlines,
+The contents of the link label are parsed as inlines,
which are used as the link's text. The link's URI and title are
provided by the matching reference link definition. Thus,
`[foo][]` is equivalent to `[foo][foo]`.
@@ -8348,7 +8362,7 @@ A [shortcut reference link](@)
consists of a [link label] that [matches] a
[link reference definition] elsewhere in the
document and is not followed by `[]` or a link label.
-The contents of the first link label are parsed as inlines,
+The contents of the link label are parsed as inlines,
which are used as the link's text. The link's URI and title
are provided by the matching link reference definition.
Thus, `[foo]` is equivalent to `[foo][]`.
@@ -8435,7 +8449,7 @@ following closing bracket:
````````````````````````````````
-Full and compact references take precedence over shortcut
+Full and collapsed references take precedence over shortcut
references:
```````````````````````````````` example
@@ -8771,9 +8785,9 @@ Here are some valid autolinks:
```````````````````````````````` example
-
+
.
-http://foo.bar.baz/test?q=hello&id=22&boolean
+https://foo.bar.baz/test?q=hello&id=22&boolean
````````````````````````````````
@@ -8813,9 +8827,9 @@ with their syntax:
```````````````````````````````` example
-
+
.
-http://../
+https://../
````````````````````````````````
@@ -8829,18 +8843,18 @@ with their syntax:
Spaces are not allowed in autolinks:
```````````````````````````````` example
-
+
.
-<http://foo.bar/baz bim>
+<https://foo.bar/baz bim>
````````````````````````````````
Backslash-escapes do not work inside autolinks:
```````````````````````````````` example
-
+
.
-http://example.com/\[\
+https://example.com/\[\
````````````````````````````````
@@ -8892,9 +8906,9 @@ These are not autolinks:
```````````````````````````````` example
-< http://foo.bar >
+< https://foo.bar >
.
-< http://foo.bar >
+< https://foo.bar >
````````````````````````````````
@@ -8913,9 +8927,9 @@ These are not autolinks:
```````````````````````````````` example
-http://example.com
+https://example.com
.
-http://example.com
+https://example.com
````````````````````````````````
@@ -8977,10 +8991,9 @@ A [closing tag](@) consists of the string ``, a
[tag name], optional spaces, tabs, and up to one line ending, and the character
`>`.
-An [HTML comment](@) consists of ``,
-where *text* does not start with `>` or `->`, does not end with `-`,
-and does not contain `--`. (See the
-[HTML5 spec](http://www.w3.org/TR/html5/syntax.html#comments).)
+An [HTML comment](@) consists of ``, ``, or ``, and `-->` (see the
+[HTML spec](https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state)).
A [processing instruction](@)
consists of the string ``, a string
@@ -9119,30 +9132,20 @@ Illegal attributes in closing tag:
Comments:
```````````````````````````````` example
-foo
+foo
.
-foo
+foo
````````````````````````````````
-
-```````````````````````````````` example
-foo
-.
-foo <!-- not a comment -- two hyphens -->
-````````````````````````````````
-
-
-Not comments:
-
```````````````````````````````` example
foo foo -->
-foo
+foo foo -->
.
-foo <!--> foo -->
-foo <!-- foo--->
+foo foo -->
+foo foo -->
````````````````````````````````
@@ -9671,7 +9674,7 @@ through the stack for an opening `[` or `![` delimiter.
delimiter from the stack, and return a literal text node `]`.
- If we find one and it's active, then we parse ahead to see if
- we have an inline link/image, reference link/image, compact reference
+ we have an inline link/image, reference link/image, collapsed reference
link/image, or shortcut reference link/image.
+ If we don't, then we remove the opening delimiter from the