@@ -10,11 +10,9 @@ enum Plist2HTML {
1010 static let footerKey = " FooterText "
1111
1212 static func body( with content: String ) -> String {
13-
1413 let color = Plist2HTML . blackHTMLColor
1514 let fullBody = ( " <body style= \" background-color: \( color) ; \" > " + content + " </body> " )
1615
17- // Adding style this way to make it more readable and easier to be modified
1816 let style = """
1917 <style> html, body { font-family: Calibri, \" PT Sans \" ,sans-serif; padding: 15px; }
2018 ol {
@@ -39,27 +37,23 @@ enum Plist2HTML {
3937 }
4038
4139 static func header( with title: String ) -> String {
42-
4340 let color = Plist2HTML . whiteHTMLColor
4441 return ( " <h1 style= \" color: \( color) ; \" > " + title + " </h1> " )
4542 }
4643
4744 static func subheader( with subtitle: String ) -> String {
48-
4945 let color = Plist2HTML . whiteHTMLColor
5046 return ( " <h3 style= \" color: \( color) ; \" > " + subtitle + " </h3> " )
5147 }
5248
5349 static func paragraph( with text: String ) -> String {
54-
5550 let color = Plist2HTML . whiteHTMLColor
5651 return ( " <p style= \" color: \( color) ; \" > " + text + " </p> " )
5752 }
5853
5954 /// Transforms the plist file containing the acknowledgments into an HTML
6055 /// - Parameter url: URL pointing to acknowledgments file
6156 static func transformPlistFile( from url: URL ) -> String {
62-
6357 guard
6458 let plistDict = NSDictionary ( contentsOfFile: url. path) ,
6559 let acknowledgmentsMultiList = plistDict [ Plist2HTML . ackKey] as? NSArray else {
@@ -89,8 +83,6 @@ enum Plist2HTML {
8983 htmlString += Plist2HTML . blankLine
9084 }
9185
92- let styledHTMLString = Plist2HTML . body ( with: htmlString)
93-
94- return styledHTMLString
86+ return Plist2HTML . body ( with: htmlString)
9587 }
9688}
0 commit comments