diff --git a/.gitattributes b/.gitattributes index ebff33b13..f63d43b42 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,4 +5,5 @@ *.golden binary dhall-csv/tasty/data/* binary dhall-docs/tasty/data/golden/**/*.html binary +dhall-docs/tasty/data/package/StandaloneTextFile.txt binary dhall-yaml/tasty/data/* binary diff --git a/dhall-docs/dhall-docs.cabal b/dhall-docs/dhall-docs.cabal index ff94fc09f..d6bcdf438 100644 --- a/dhall-docs/dhall-docs.cabal +++ b/dhall-docs/dhall-docs.cabal @@ -65,7 +65,7 @@ Library Build-Depends: base >= 4.11.0.0 && < 5 , base16-bytestring >= 1.0.0.0 , - bytestring < 0.12, + bytestring < 0.13, containers , cryptohash-sha256 , directory >= 1.3.0.0 && < 1.4 , @@ -81,7 +81,7 @@ Library -- path-io follows SemVer: https://github.com/mrkkrp/path-io/issues/68 path-io >= 1.6.0 && < 2 , prettyprinter >= 1.7.0 && < 1.8 , - text >= 0.11.1.0 && < 2.1 , + text >= 0.11.1.0 && < 2.2 , transformers >= 0.2.0.0 && < 0.7 , mtl >= 2.2.1 && < 2.4 , optparse-applicative >= 0.14.0.0 && < 0.19 diff --git a/dhall-docs/src/Dhall/Docs/Html.hs b/dhall-docs/src/Dhall/Docs/Html.hs index d88608614..cdbd7b785 100644 --- a/dhall-docs/src/Dhall/Docs/Html.hs +++ b/dhall-docs/src/Dhall/Docs/Html.hs @@ -77,7 +77,7 @@ dhallFileToHtml filePath contents expr examples header params@DocParams{..} = htmlTitle = breadCrumbsToText breadcrumb clipboardText = fold baseImportUrl <> htmlTitle --- | Generates an @`Html` ()@ with all the information about a dhall file +-- | Generates an @`Html` ()@ with all the information about a non-dhall text file textFileToHtml :: Path Rel File -- ^ Source file name, used to extract the title -> Text -- ^ Contents of the file @@ -93,7 +93,7 @@ textFileToHtml filePath contents params@DocParams{..} = copyToClipboardButton clipboardText br_ [] h3_ "Source" - div_ [class_ "source-code"] (toHtml contents) + div_ [class_ "source-code"] $ pre_ (toHtml contents) where breadcrumb = relPathToBreadcrumb filePath htmlTitle = breadCrumbsToText breadcrumb diff --git a/dhall-docs/tasty/data/golden/StandaloneTextFile.txt.html b/dhall-docs/tasty/data/golden/StandaloneTextFile.txt.html new file mode 100644 index 000000000..f44968416 --- /dev/null +++ b/dhall-docs/tasty/data/golden/StandaloneTextFile.txt.html @@ -0,0 +1,45 @@ + + + +/StandaloneTextFile.txt + + + + + + + +
+

+/ +test-package +/ +StandaloneTextFile.txt +

+ + +Copy path to clipboard + + +
+

Source

+
+
This is a text file that is not referenced by any dhall file.
+
++---------------------------------------------------+
+| It should be displayed as <pre>preformatted</pre> |
+|   text, with horizontal and vertical whitespace   |
+|          preserved, to keep it readable.          |
++---------------------------------------------------+
+
+
+
+ + \ No newline at end of file diff --git a/dhall-docs/tasty/data/golden/index.html b/dhall-docs/tasty/data/golden/index.html index a976fc0d6..a8b31c437 100644 --- a/dhall-docs/tasty/data/golden/index.html +++ b/dhall-docs/tasty/data/golden/index.html @@ -171,6 +171,9 @@

Exported files:

  • +StandaloneTextFile.txt +
  • +
  • TwoAnnotations.dhall : diff --git a/dhall-docs/tasty/data/package/StandaloneTextFile.txt b/dhall-docs/tasty/data/package/StandaloneTextFile.txt new file mode 100644 index 000000000..a3e6eac66 --- /dev/null +++ b/dhall-docs/tasty/data/package/StandaloneTextFile.txt @@ -0,0 +1,7 @@ +This is a text file that is not referenced by any dhall file. + ++---------------------------------------------------+ +| It should be displayed as
    preformatted
    | +| text, with horizontal and vertical whitespace | +| preserved, to keep it readable. | ++---------------------------------------------------+ diff --git a/dhall-json/dhall-json.cabal b/dhall-json/dhall-json.cabal index 76f3b8080..e8d3f2bba 100644 --- a/dhall-json/dhall-json.cabal +++ b/dhall-json/dhall-json.cabal @@ -41,7 +41,7 @@ Library aeson >= 1.4.6.0 && < 2.2 , aeson-pretty >= 0.8.0 && < 0.9 , aeson-yaml >= 1.1.0 && < 1.2 , - bytestring < 0.12, + bytestring < 0.13, containers >= 0.5.9 && < 0.7 , dhall >= 1.42.0 && < 1.43, exceptions >= 0.8.3 && < 0.11, @@ -50,7 +50,7 @@ Library optparse-applicative >= 0.14.0.0 && < 0.19, prettyprinter >= 1.7.0 && < 1.8 , scientific >= 0.3.0.0 && < 0.4 , - text >= 0.11.1.0 && < 2.1 , + text >= 0.11.1.0 && < 2.2 , unordered-containers < 0.3 , vector Exposed-Modules: diff --git a/dhall-yaml/dhall-yaml.cabal b/dhall-yaml/dhall-yaml.cabal index 324a7d0a1..48a751692 100644 --- a/dhall-yaml/dhall-yaml.cabal +++ b/dhall-yaml/dhall-yaml.cabal @@ -35,11 +35,11 @@ Library HsYAML-aeson >= 0.2 && < 0.3 , base >= 4.11.0.0 && < 5 , aeson >= 1.0.0.0 && < 2.2 , - bytestring < 0.12, + bytestring < 0.13, dhall >= 1.31.0 && < 1.43, dhall-json >= 1.6.0 && < 1.8 , optparse-applicative >= 0.14.0.0 && < 0.19, - text >= 0.11.1.0 && < 2.1 , + text >= 0.11.1.0 && < 2.2 , vector Exposed-Modules: Dhall.Yaml