From b7d02cadbb041ca3f789f7d0cfea07bd5c7cbe6f Mon Sep 17 00:00:00 2001 From: Miha Zupan Date: Sun, 13 Mar 2022 01:54:44 +0100 Subject: [PATCH] Fix TrackTrivia /// comments --- src/Markdig/Roundtrip.md | 4 ++-- src/Markdig/Syntax/IBlock.cs | 4 ++-- src/Markdig/Syntax/IFencedBlock.cs | 17 ++++++++--------- src/Markdig/Syntax/Inlines/LinkInline.cs | 12 ++++++------ src/Markdig/Syntax/LinkReferenceDefinition.cs | 10 +++++----- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/Markdig/Roundtrip.md b/src/Markdig/Roundtrip.md index c333f2d33..8541747d2 100644 --- a/src/Markdig/Roundtrip.md +++ b/src/Markdig/Roundtrip.md @@ -111,14 +111,14 @@ All trivia in a document should be attached to a node. The `Block` class defines /// /// Gets or sets the trivia right before this block. /// Trivia: only parsed when is enabled, otherwise -/// . +/// . /// public StringSlice TriviaBefore { get; set; } /// /// Gets or sets trivia occurring after this block. /// Trivia: only parsed when is enabled, otherwise -/// . +/// . /// public StringSlice TriviaAfter { get; set; } ``` diff --git a/src/Markdig/Syntax/IBlock.cs b/src/Markdig/Syntax/IBlock.cs index e0e4f8062..441157c96 100644 --- a/src/Markdig/Syntax/IBlock.cs +++ b/src/Markdig/Syntax/IBlock.cs @@ -61,13 +61,13 @@ public interface IBlock : IMarkdownObject /// /// Trivia occurring before this block /// - /// Trivia: only parsed when is enabled, otherwise . + /// Trivia: only parsed when is enabled, otherwise . StringSlice TriviaBefore { get; set; } /// /// Trivia occurring after this block /// - /// Trivia: only parsed when is enabled, otherwise . + /// Trivia: only parsed when is enabled, otherwise . StringSlice TriviaAfter { get; set; } } } \ No newline at end of file diff --git a/src/Markdig/Syntax/IFencedBlock.cs b/src/Markdig/Syntax/IFencedBlock.cs index 4f0c41523..7b0720423 100644 --- a/src/Markdig/Syntax/IFencedBlock.cs +++ b/src/Markdig/Syntax/IFencedBlock.cs @@ -3,7 +3,6 @@ // See the license.txt file in the project root for more information. using Markdig.Helpers; -using Markdig.Parsers; namespace Markdig.Syntax { @@ -25,7 +24,7 @@ public interface IFencedBlock : IBlock /// /// Gets or sets the trivia after the . /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// StringSlice TriviaAfterFencedChar { get; set; } @@ -38,14 +37,14 @@ public interface IFencedBlock : IBlock /// /// Non-escaped exactly as in source markdown. /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// StringSlice UnescapedInfo { get; set; } /// /// Gets or sets the trivia after the . /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// StringSlice TriviaAfterInfo { get; set; } @@ -58,28 +57,28 @@ public interface IFencedBlock : IBlock /// /// Non-escaped exactly as in source markdown. /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// StringSlice UnescapedArguments { get; set; } /// /// Gets or sets the trivia after the . /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// StringSlice TriviaAfterArguments { get; set; } /// /// Newline of the line with the opening fenced chars. /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// NewLine InfoNewLine { get; set; } /// /// Trivia before the closing fenced chars /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// StringSlice TriviaBeforeClosingFence { get; set; } @@ -92,7 +91,7 @@ public interface IFencedBlock : IBlock /// Newline after the last line, which is always the line containing the closing fence chars. /// "Inherited" from . /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// NewLine NewLine { get; set; } } diff --git a/src/Markdig/Syntax/Inlines/LinkInline.cs b/src/Markdig/Syntax/Inlines/LinkInline.cs index fbf6152da..43d587a57 100644 --- a/src/Markdig/Syntax/Inlines/LinkInline.cs +++ b/src/Markdig/Syntax/Inlines/LinkInline.cs @@ -67,7 +67,7 @@ public LinkInline(string url, string title) /// /// Gets or sets the with trivia. /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// public StringSlice LabelWithTrivia { get => _trivia?.LabelWithTrivia ?? StringSlice.Empty; set => Trivia.LabelWithTrivia = value; } @@ -98,7 +98,7 @@ public LinkInline(string url, string title) /// /// Gets or sets the trivia before the . /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// public StringSlice TriviaBeforeUrl { get => _trivia?.TriviaBeforeUrl ?? StringSlice.Empty; set => Trivia.TriviaBeforeUrl = value; } @@ -123,14 +123,14 @@ public LinkInline(string url, string title) /// /// The but with trivia and unescaped characters /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// public StringSlice UnescapedUrl { get => _trivia?.UnescapedUrl ?? StringSlice.Empty; set => Trivia.UnescapedUrl = value; } /// /// Any trivia after the . /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// public StringSlice TriviaAfterUrl { get => _trivia?.TriviaAfterUrl ?? StringSlice.Empty; set => Trivia.TriviaAfterUrl = value; } @@ -160,14 +160,14 @@ public LinkInline(string url, string title) /// Gets or sets the exactly as parsed from the /// source document including unescaped characters /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// public StringSlice UnescapedTitle { get => _trivia?.UnescapedTitle ?? StringSlice.Empty; set => Trivia.UnescapedTitle = value; } /// /// Gets or sets the trivia after the . /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// public StringSlice TriviaAfterTitle { get => _trivia?.TriviaAfterTitle ?? StringSlice.Empty; set => Trivia.TriviaAfterTitle = value; } diff --git a/src/Markdig/Syntax/LinkReferenceDefinition.cs b/src/Markdig/Syntax/LinkReferenceDefinition.cs index 5efa59a17..321d07b53 100644 --- a/src/Markdig/Syntax/LinkReferenceDefinition.cs +++ b/src/Markdig/Syntax/LinkReferenceDefinition.cs @@ -63,14 +63,14 @@ public LinkReferenceDefinition(string? label, string? url, string? title) : this /// /// Non-normalized Label (includes trivia) /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// public StringSlice LabelWithTrivia { get => _trivia?.LabelWithTrivia ?? StringSlice.Empty; set => Trivia.LabelWithTrivia = value; } /// /// Whitespace before the . /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// public StringSlice TriviaBeforeUrl { get => _trivia?.TriviaBeforeUrl ?? StringSlice.Empty; set => Trivia.TriviaBeforeUrl = value; } @@ -87,7 +87,7 @@ public LinkReferenceDefinition(string? label, string? url, string? title) : this /// /// Non-normalized . /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// public StringSlice UnescapedUrl { get => _trivia?.UnescapedUrl ?? StringSlice.Empty; set => Trivia.UnescapedUrl = value; } @@ -101,7 +101,7 @@ public LinkReferenceDefinition(string? label, string? url, string? title) : this /// /// gets or sets the whitespace before a . /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// public StringSlice TriviaBeforeTitle { get => _trivia?.TriviaBeforeTitle ?? StringSlice.Empty; set => Trivia.TriviaBeforeTitle = value; } @@ -118,7 +118,7 @@ public LinkReferenceDefinition(string? label, string? url, string? title) : this /// /// Non-normalized . /// Trivia: only parsed when is enabled, otherwise - /// . + /// . /// public StringSlice UnescapedTitle { get => _trivia?.UnescapedTitle ?? StringSlice.Empty; set => Trivia.UnescapedTitle = value; }