Skip to content

Commit

Permalink
Merge branch 'main' into typo_warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriella439 authored Mar 2, 2024
2 parents 9814977 + 277d8b1 commit 40efe67
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions dhall-docs/dhall-docs.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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 ,
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dhall-docs/src/Dhall/Docs/Html.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
45 changes: 45 additions & 0 deletions dhall-docs/tasty/data/golden/StandaloneTextFile.txt.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE HTML>
<html>
<head>
<title>/StandaloneTextFile.txt</title>
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&amp;family=Lato:ital,wght@0,400;0,700;1,400&amp;display=swap">
<script type="text/javascript" src="index.js">
</script>
<meta charset="UTF-8">
</head>
<body>
<div class="nav-bar">
<img class="dhall-icon" src="dhall-icon.svg">
<p class="package-title">test-package</p>
<div class="nav-bar-content-divider">
</div>
<a id="switch-light-dark-mode" class="nav-option">Switch Light/Dark Mode</a>
</div>
<div class="main-container">
<h2 class="doc-title">
<span class="crumb-divider">/</span>
<a href="index.html">test-package</a>
<span class="crumb-divider">/</span>
<span class="title-crumb" href="index.html">StandaloneTextFile.txt</span>
</h2>
<a class="copy-to-clipboard" data-path="/StandaloneTextFile.txt">
<i>
<small>Copy path to clipboard</small>
</i>
</a>
<br>
<h3>Source</h3>
<div class="source-code">
<pre>This is a text file that is not referenced by any dhall file.

+---------------------------------------------------+
| It should be displayed as &lt;pre&gt;preformatted&lt;/pre&gt; |
| text, with horizontal and vertical whitespace |
| preserved, to keep it readable. |
+---------------------------------------------------+
</pre>
</div>
</div>
</body>
</html>
3 changes: 3 additions & 0 deletions dhall-docs/tasty/data/golden/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ <h3>Exported files: </h3>
</span>
</li>
<li>
<a href="StandaloneTextFile.txt.html">StandaloneTextFile.txt</a>
</li>
<li>
<a href="TwoAnnotations.dhall.html">TwoAnnotations.dhall</a>
<span class="of-type-token">:</span>
<span class="dhall-type source-code">
Expand Down
7 changes: 7 additions & 0 deletions dhall-docs/tasty/data/package/StandaloneTextFile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
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. |
+---------------------------------------------------+
4 changes: 2 additions & 2 deletions dhall-json/dhall-json.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions dhall-yaml/dhall-yaml.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40efe67

Please sign in to comment.