mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
[PR #281] [MERGED] Render XML well-formed boolean attribute #909
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/xoofx/markdig/pull/281
Author: @FranklinWhale
Created: 1/3/2019
Status: ✅ Merged
Merged: 1/4/2019
Merged by: @xoofx
Base:
master← Head:bool-attr📝 Commits (5)
f932b3cUse attribute name as value if value is nullcde939fUpdate spec and test cases0920001Remove the unnecessary EOL at the end02bd814Use empty string instead of attribute name57692a5controls attribute is also changed📊 Changes
3 files changed (+14 additions, -17 deletions)
View changed files
📝
src/Markdig.Tests/Specs/MediaSpecs.md(+4 -4)📝
src/Markdig.Tests/Specs/Specs.cs(+7 -7)📝
src/Markdig/Renderers/HtmlRenderer.cs(+3 -6)📄 Description
Although HTML boolean attribute can have its value assignment omitted, such omission is not supported in XHTML because the syntax is not XML well-formed. Being well-formed XML allows the content to be processed by XML API such as LINQ to XML. This PR changes the attribute rendering method so that the value assignment of a boolean attribute is always specified (https://www.w3.org/TR/html/infrastructure.html#boolean-attribute).
This PR, if approved, replaces #280.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.