From 04ab0ea7531f46191a05ae0c29167f9e86fc40f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steve=20Ch=C3=A1vez?= Date: Fri, 25 Jan 2019 12:04:36 -0500 Subject: [PATCH] Fix #1223, incorrect OpenAPI externalDocs url (#1232) --- CHANGELOG.md | 2 ++ src/PostgREST/Config.hs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d6db62f6..084c50a8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed +- #1223, Fix incorrect OpenAPI externalDocs url - @steve-chavez + ## [5.2.0] - 2018-12-12 ### Added diff --git a/src/PostgREST/Config.hs b/src/PostgREST/Config.hs index 44f83aa34..39ba4a355 100644 --- a/src/PostgREST/Config.hs +++ b/src/PostgREST/Config.hs @@ -37,7 +37,7 @@ import Data.List (lookup) import Data.Monoid import Data.Scientific (floatingOrInteger) import Data.String (String) -import Data.Text (dropAround, +import Data.Text (dropWhileEnd, dropEnd, intercalate, lines, strip, take, splitOn) import Data.Text.Encoding (encodeUtf8) @@ -112,7 +112,7 @@ prettyVersion = -- | Version number used in docs docsVersion :: Text -docsVersion = "v" <> dropAround (== '.') (dropAround (/= '.') prettyVersion) +docsVersion = "v" <> dropEnd 1 (dropWhileEnd (/= '.') prettyVersion) -- | Function to read and parse options from the command line readOptions :: IO AppConfig