This repository has been archived by the owner on Jul 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3278f56
commit 7a4fd86
Showing
13 changed files
with
145 additions
and
13 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace EhTagClient | ||
{ | ||
static class Context | ||
{ | ||
public static Database Database { get; set; } | ||
public static Namespace Namespace { get; set; } | ||
public static string Raw { get; set; } | ||
public static Record Record { get; set; } | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using Markdig.Renderers; | ||
using Markdig.Renderers.Html; | ||
using Markdig.Syntax.Inlines; | ||
using System; | ||
|
||
namespace EhTagClient.MarkdigExt.Html | ||
{ | ||
class CodeInlineRenderer : HtmlObjectRenderer<CodeInline> | ||
{ | ||
protected override void Write(HtmlRenderer renderer, CodeInline obj) | ||
{ | ||
var content = obj.Content; | ||
var tag = Extension.GetTag(content); | ||
if (renderer.EnableHtmlForInline) | ||
renderer.Write("<ruby>"); | ||
if (tag != null) | ||
{ | ||
renderer.WriteEscape(tag.Name.Text); | ||
if (renderer.EnableHtmlForInline) | ||
{ | ||
renderer.Write("<rp>(</rp><rt>"); | ||
renderer.WriteEscape(content); | ||
renderer.Write("</rt><rp>)</rp>"); | ||
} | ||
else | ||
{ | ||
renderer.Write('('); | ||
renderer.WriteEscape(content); | ||
renderer.Write(')'); | ||
} | ||
} | ||
else | ||
{ | ||
renderer.WriteEscape(content); | ||
} | ||
if (renderer.EnableHtmlForInline) | ||
renderer.Write("</ruby>"); | ||
} | ||
} | ||
} |
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
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