Moved BindingGenerator from gen html project. It makes more sense here.

This commit is contained in:
2025-10-25 00:06:22 -04:00
parent 58a8419984
commit 603a0aa0e3
141 changed files with 12738 additions and 7 deletions

View File

@@ -0,0 +1,66 @@
//
// Del.swift
// HTMLStandard
//
// Generated on 09/23/2025.
// THIS FILE IS GENERATED. DO NOT EDIT.
//
import Foundation
/// <del> A removal from the document
public class Del : HTMLNode, IFlow, IPhrasing {
/// Link to the source of the quotation or more information about the edit. Valid URL potentially surrounded by spaces.
public var cite:URL? = nil
/// Date and (optionally) time of the change. Valid date string with optional time.
public var datetime:String? = nil
public init(_ attributes:[String:String], _ parser:XMLParser? = nil) throws {
var globalAttr = GlobalAttributesBuilder()
for (key, attValue) in attributes {
switch (key) {
case "cite":
cite = try URL(expect: attValue)
continue
case "datetime":
datetime = attValue
continue
default: break
}
if globalAttr.trySetGlobalAttribute(key, attValue) {
continue
}
continue
}
var allItems:[HTMLNode] = []
while let obj = try parser?.readObject(endTag: "del", xmlToHtmlMapper) {
allItems.append(obj)
}
super.init(globalAttr, allItems)
}
public override func renderAttributes() -> String {
var result = super.renderAttributes()
if let cite = cite {
result += " cite='\(cite.absoluteString)'"
}
if let datetime = datetime {
result += " datetime='\(datetime)'"
}
return result
}
override var nodeName: String {
return "del"
}
override var isVoidElement: Bool {
return false
}
}