Skip to content

Commit 6fe81a0

Browse files
Add clarifying comment for kbd/kdb dual mapping in factory
Agent-Logs-Url: https://github.com/webexpress-framework/WebExpress.WebCore/sessions/17d12c9c-ee3b-4dfb-b579-6b479c2f3a9a Co-authored-by: ReneSchwarzer <31061438+ReneSchwarzer@users.noreply.github.com>
1 parent a939d60 commit 6fe81a0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/WebExpress.WebCore/WebHtml/Parser/HtmlElementFactory.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ public class HtmlElementFactory
7777
["dfn"] = () => new HtmlElementTextSemanticsDfn(),
7878
["em"] = () => new HtmlElementTextSemanticsEm(),
7979
["i"] = () => new HtmlElementTextSemanticsI(),
80+
// The standard HTML element is <kbd>, but the existing class uses "kdb" as
81+
// its element name. Both spellings are mapped so that the parser handles
82+
// real-world HTML (<kbd>) as well as the project's own renderer output (<kdb>).
8083
["kbd"] = () => new HtmlElementTextSemanticsKdb(),
8184
["kdb"] = () => new HtmlElementTextSemanticsKdb(),
8285
["mark"] = () => new HtmlElementTextSemanticsMark(),

0 commit comments

Comments
 (0)