Update from Hummingbird Project Template (#58)

* Update from hummingbird-project-template 572d468b2cabeca286314c5a35196bd42445c8ef

* run swift-format

* Remove .swiftformat

---------

Co-authored-by: adam-fowler <adam-fowler@users.noreply.github.com>
Co-authored-by: Adam Fowler <adamfowler71@gmail.com>
This commit is contained in:
hummingbird-automation[bot]
2024-11-28 07:31:09 +00:00
committed by GitHub
parent 8c5c8ead74
commit ec4ef9aa04
21 changed files with 663 additions and 430 deletions

View File

@@ -21,14 +21,14 @@ public protocol MustacheContentType: Sendable {
/// Text content type where no character is escaped
struct TextContentType: MustacheContentType {
func escapeText(_ text: String) -> String {
return text
text
}
}
/// HTML content where text is escaped for HTML output
struct HTMLContentType: MustacheContentType {
func escapeText(_ text: String) -> String {
return text.htmlEscape()
text.htmlEscape()
}
}
@@ -39,7 +39,7 @@ struct HTMLContentType: MustacheContentType {
/// with `MustacheContentTypes.register`.
public enum MustacheContentTypes {
static func get(_ name: String) -> MustacheContentType? {
return self.types[name]
self.types[name]
}
/// Register new content type