From c2d9fcdf52960c2df460dc64e16228217e8088de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20St=C3=BChrk?= Date: Mon, 26 Apr 2021 18:31:26 +0200 Subject: [PATCH 1/2] Make prefix and postfix operators appear in the documentation. --- .../Supporting Types/Components/OperatorImplementations.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/swift-doc/Supporting Types/Components/OperatorImplementations.swift b/Sources/swift-doc/Supporting Types/Components/OperatorImplementations.swift index c0040a2a..f28fa761 100644 --- a/Sources/swift-doc/Supporting Types/Components/OperatorImplementations.swift +++ b/Sources/swift-doc/Supporting Types/Components/OperatorImplementations.swift @@ -53,7 +53,7 @@ struct OperatorImplementations: Component { heading = [lhs.type, function.name, rhs.type].compactMap { $0 }.joined(separator: " ") case .prefix: - guard function.signature.input.count == 2, + guard function.signature.input.count == 1, let operand = function.signature.input.first else { return nil @@ -61,7 +61,7 @@ struct OperatorImplementations: Component { heading = [function.name, operand.type].compactMap { $0 }.joined(separator: " ") case .postfix: - guard function.signature.input.count == 2, + guard function.signature.input.count == 1, let operand = function.signature.input.first else { return nil From 3fd10a847d54d15f811e2a382db3b16e20c1125c Mon Sep 17 00:00:00 2001 From: Mattt Date: Wed, 28 Apr 2021 10:13:55 -0700 Subject: [PATCH 2/2] Add changelog entry for #262 --- Changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Changelog.md b/Changelog.md index 33f0dcc9..538190ea 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fixed bug that caused prefix and postfix operators to be omitted + from generated documentation. + #262 by @Lukas-Stuehrk. + ## [1.0.0-beta.6] - 2021-04-24 ### Added