CardBuilder.MarkdownRender renders GitHub issue and comment bodies onto the image card the QQ adapters receive through the broadcast fallback. Two constructs that are common in GitHub bodies come out as literal source.
Raw HTML blocks are truncated to 20 characters and drawn verbatim. The HtmlBlock default branch emits htmlRaw[..20] in LightSeaGreen (src/HuaJiBot.NET/Utils/CardBuilder.cs:413-447). On the repair-tickets cards in the Repair topic this shows up as the string below, which is exactly the first 20 characters of a collapsed section:
HtmlInline has the same shape, drawing the bare tag in gray italic (src/HuaJiBot.NET/Utils/CardBuilder.cs:302).
Tables render as their source. Markdown.Parse(markdown) is called with no pipeline (src/HuaJiBot.NET/Utils/CardBuilder.cs:231), so no Markdig extension is enabled and GFM pipe tables are never recognized. The repair-tickets bodies land on the card as a | Field | Value | Description | header followed by the |---|---|---| separator row.
Both appear on the same card, so any repair ticket produces a card with four lines of unrendered source in the middle of it.
Direction, needs a decision before anyone starts:
- Tables: build the pipeline once with
new MarkdownPipelineBuilder().UsePipeTables().Build() and pass it to Markdown.Parse, then add a Table case to ProcessBlock. Laying a real table out as TextRuns is most of the work here.
- HTML: decide whether to drop these blocks outright, the way
HtmlBlockType.Comment already does, or unwrap the handful of tags GitHub bodies actually use — <details>, <summary>, <img>, <br>. Printing 20 characters of source helps nobody either way.
Not urgent while production is down (#22).
CardBuilder.MarkdownRenderrenders GitHub issue and comment bodies onto the image card the QQ adapters receive through the broadcast fallback. Two constructs that are common in GitHub bodies come out as literal source.Raw HTML blocks are truncated to 20 characters and drawn verbatim. The
HtmlBlockdefault branch emitshtmlRaw[..20]in LightSeaGreen (src/HuaJiBot.NET/Utils/CardBuilder.cs:413-447). On the repair-tickets cards in the Repair topic this shows up as the string below, which is exactly the first 20 characters of a collapsed section:HtmlInlinehas the same shape, drawing the bare tag in gray italic (src/HuaJiBot.NET/Utils/CardBuilder.cs:302).Tables render as their source.
Markdown.Parse(markdown)is called with no pipeline (src/HuaJiBot.NET/Utils/CardBuilder.cs:231), so no Markdig extension is enabled and GFM pipe tables are never recognized. The repair-tickets bodies land on the card as a| Field | Value | Description |header followed by the|---|---|---|separator row.Both appear on the same card, so any repair ticket produces a card with four lines of unrendered source in the middle of it.
Direction, needs a decision before anyone starts:
new MarkdownPipelineBuilder().UsePipeTables().Build()and pass it toMarkdown.Parse, then add aTablecase toProcessBlock. Laying a real table out asTextRuns is most of the work here.HtmlBlockType.Commentalready does, or unwrap the handful of tags GitHub bodies actually use —<details>,<summary>,<img>,<br>. Printing 20 characters of source helps nobody either way.Not urgent while production is down (#22).