-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed markdown special characters not escaped (fixes #117)
fixed unhandled xml elements not rendering as is in markdown (fixes #126)
- Loading branch information
Showing
67 changed files
with
294 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
source/DefaultDocumentation.Markdown/Elements/BrElement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using System.Xml.Linq; | ||
using DefaultDocumentation.Api; | ||
|
||
namespace DefaultDocumentation.Markdown.Elements; | ||
|
||
/// <summary> | ||
/// Handles <c>br</c> xml element. | ||
/// </summary> | ||
public sealed class BrElement : IElement | ||
{ | ||
/// <summary> | ||
/// The name of this implementation used at the configuration level. | ||
/// </summary> | ||
public const string ConfigName = "br"; | ||
|
||
/// <inheritdoc/> | ||
public string Name => ConfigName; | ||
|
||
/// <inheritdoc/> | ||
public void Write(IWriter writer, XElement element) | ||
{ | ||
writer.ThrowIfNull(); | ||
element.ThrowIfNull(); | ||
|
||
using (writer.AppendAsRaw()) | ||
{ | ||
writer.Append("<br/>"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
source/DefaultDocumentation.Markdown/Elements/ParamRefElement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
source/DefaultDocumentation.Markdown/Elements/TypeParamRefElement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
source/DefaultDocumentation.Markdown/Internal/DisposableAction.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
|
||
namespace DefaultDocumentation.Markdown.Internal; | ||
|
||
internal sealed class DisposableAction : IDisposable | ||
{ | ||
private readonly Action _action; | ||
|
||
public DisposableAction(Action action) | ||
{ | ||
_action = action; | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
GC.SuppressFinalize(this); | ||
|
||
_action(); | ||
} | ||
} |
8 changes: 7 additions & 1 deletion
8
source/DefaultDocumentation.Markdown/Internal/Extensions/StringExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
source/DefaultDocumentation.Markdown/Sections/DefinitionSection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
source/DefaultDocumentation.Markdown/Sections/EventTypeSection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.