From f40f0c5623e5523e4ce9320523d3ebd9d17e08c8 Mon Sep 17 00:00:00 2001 From: Andrew Martin Date: Fri, 18 Oct 2019 13:56:02 -0400 Subject: [PATCH] fix haddock formatting in the json escape sequence example --- src/Data/ByteArray/Builder.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Data/ByteArray/Builder.hs b/src/Data/ByteArray/Builder.hs index 0344dff..7b187e0 100644 --- a/src/Data/ByteArray/Builder.hs +++ b/src/Data/ByteArray/Builder.hs @@ -460,9 +460,9 @@ shortTextUtf8 a = -- and JSON special characters will be escaped. Additionally, the -- result is surrounded by double quotes. For example: -- --- * @foo ==> "foo"@ --- * @\_"_/ ==> "\\_\"_/"@ --- * @helloworld ==> "hello\u001Bworld"@ (where is code point 0x1B) +-- * @foo ==\> "foo"@ (no escape sequences) +-- * @\\_"_\/ ==\> "\\\\_\\"_\/"@ (escapes backslashes and quotes) +-- * @hello\world ==> "hello\\u001Bworld"@ (where @\@ is code point 0x1B) shortTextJsonString :: ShortText -> Builder shortTextJsonString a = let !(ByteArray ba) = shortTextToByteArray a