     }
 
     private func decode(base: Int) -> Character? {
-        guard
-            let code = UInt32(self, radix: base),
-            let unicode = UnicodeScalar(code)
-        else {
-            return .none
-        }
-        return Character(unicode)
+        return UInt32(self, radix: base)
+            .flatMap(UnicodeScalar.init)
+            .flatMap(Character.init)
     }
 }


        switch self[next] {
        case " ":
            return parseTagStart(after: next)
        case "/":
            let closeTag = index(after: next)
            guard closeTag < endIndex else {
                return .none
            }
            if let (option, end) = parseInnerTag(from: closeTag) {
                return (.close(option), tagStart..<end)
            } else {
                return .none
            }
        default:
            if let (option, end) = parseInnerTag(from: next) {
                return (.open(option), tagStart..<end)
            } else {
                return .none
            }
        }
    }

    private func parseInnerTag(from start: Index) -> (Formatting?, Index)? {
        let next = index(after: start)
        guard let close = range(of: ">", range: next..<endIndex)?.lowerBound else {
            return .none
        }

        let end = range(of: " ", range: next..<close)?.lowerBound ?? close
        let tag = self[start..<end]
        return (htmlTags[tag], close)
    }

                        }
                    }
                    push(tag: innerTag)
                case let .close(innerTag?):
                    pop(tag: innerTag)
                    if innerTag == .paragraph && range.upperBound < index(before: endIndex) {
                        result.append("\n\n")
