Skip to content

Commit 7c2f860

Browse files
committed
Better naming to the extension func
1 parent 65885a2 commit 7c2f860

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Hardware/Hardware/Printer/AirPrintReceipt/ReceiptRenderer.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private extension ReceiptRenderer {
110110
private func summaryTable() -> String {
111111
var summaryContent = "<table>"
112112
for line in content.lineItems {
113-
let stripedTitle = line.title.stripHtml()
113+
let stripedTitle = line.title.htmlStripped()
114114
summaryContent += "<tr><td>\(stripedTitle) × \(line.quantity)</td><td>\(line.amount) \(content.parameters.currency.uppercased())</td></tr>"
115115
}
116116
summaryContent += totalRows()
@@ -159,8 +159,8 @@ private extension ReceiptRenderer {
159159
/// are required in the US.
160160
/// https://stripe.com/docs/terminal/checkout/receipts#custom
161161
return """
162-
\(Localization.applicationName): \(emv.applicationPreferredName.stripHtml())<br/>
163-
\(Localization.aid): \(emv.dedicatedFileName.stripHtml())
162+
\(Localization.applicationName): \(emv.applicationPreferredName.htmlStripped())<br/>
163+
\(Localization.aid): \(emv.dedicatedFileName.htmlStripped())
164164
"""
165165
}
166166

@@ -253,7 +253,7 @@ private extension ReceiptRenderer {
253253
}
254254

255255
private extension String {
256-
func stripHtml() -> String {
256+
func htmlStripped() -> String {
257257
let data = Data(utf8)
258258
do {
259259
return try NSAttributedString(

0 commit comments

Comments
 (0)