Skip to content

Commit

Permalink
docs: improve haskell example (thanks @imcotton)
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Aug 26, 2024
1 parent 4c01593 commit 2d17a39
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 13 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
*.golden linguist-generated
styles/gallery/auto.png filter=lfs diff=lfs merge=lfs -text
styles/gallery/dark.png filter=lfs diff=lfs merge=lfs -text
styles/gallery/dracula.png filter=lfs diff=lfs merge=lfs -text
styles/gallery/light.png filter=lfs diff=lfs merge=lfs -text
styles/gallery/notty.png filter=lfs diff=lfs merge=lfs -text
styles/gallery/pink.png filter=lfs diff=lfs merge=lfs -text
styles/gallery/tokyo-night.png filter=lfs diff=lfs merge=lfs -text
styles/gallery/ascii.png filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

Stylesheet-based markdown rendering for your CLI apps.

![Glamour dark style example](https://stuff.charm.sh/glamour/glamour-example.png)
![Glamour dark style example](https://github.com/user-attachments/assets/6a1a08c5-132c-4c9b-ab01-7fd7899eab97)

`glamour` lets you render [markdown](https://en.wikipedia.org/wiki/Markdown)
documents & templates on [ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code)
Expand Down
11 changes: 5 additions & 6 deletions examples/artichokes/artichokes.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,15 @@ Remember that to compile Haskell you’ll need `ghc`.
```haskell
module Main where

import Data.Function ( (&) )
import Data.List ( intercalculate )
import Data.List (intercalate)

hello :: String -> String
hello s =
"Hello, " ++ s ++ "."
hello s = "Hello, " <> s <> "."

main :: IO ()
main =
map hello [ "artichoke", "alcachofa" ] & intercalculate "\n" & putStrLn
main = putStrLn
$ intercalate "\n"
$ hello <$> [ "artichoke", "alcachofa" ]
```

***
Expand Down
Binary file modified styles/gallery/ascii.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified styles/gallery/auto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified styles/gallery/dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified styles/gallery/dracula.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified styles/gallery/light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified styles/gallery/notty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified styles/gallery/pink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified styles/gallery/tokyo-night.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions testdata/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,15 @@ Remember that to compile Haskell you’ll need `ghc`.
```haskell
module Main where

import Data.Function ( (&) )
import Data.List ( intercalculate )
import Data.List (intercalate)

hello :: String -> String
hello s =
"Hello, " ++ s ++ "."
hello s = "Hello, " <> s <> "."

main :: IO ()
main =
map hello [ "artichoke", "alcachofa" ] & intercalculate "\n" & putStrLn
main = putStrLn
$ intercalate "\n"
$ hello <$> [ "artichoke", "alcachofa" ]
```

***
Expand Down

0 comments on commit 2d17a39

Please sign in to comment.