Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for D2 #60

Merged
merged 1 commit into from
Jun 1, 2023
Merged

Add support for D2 #60

merged 1 commit into from
Jun 1, 2023

Conversation

SanchayanMaity
Copy link
Contributor

Adds support for D2, a modern diagram scripting language that turns text to diagrams.

See https://d2lang.com/ for documentation on D2.

Closes #57.

Adds support for D2, a modern diagram scripting language that turns
text to diagrams.

See https://d2lang.com/ for documentation on D2.
@LaurentRDC
Copy link
Owner

Thank you for your contribution!

Test failures are due to a breaking change in optparse-applicative. I'm working to mitigate this on the master branch. Once this is done, I'll create a new release with your contribution

@LaurentRDC LaurentRDC merged commit 684081f into LaurentRDC:master Jun 1, 2023
@SanchayanMaity
Copy link
Contributor Author

Thank you for your contribution!

Test failures are due to a breaking change in optparse-applicative. I'm working to mitigate this on the master branch. Once this is done, I'll create a new release with your contribution

Thank you.

FWIW, locally I worked with allow-newer being set to true in my cabal config and had the below diff for everything to work and all tests passing.

diff --git a/executable/Main.hs b/executable/Main.hs
index dc52b6d..382f2a6 100644
--- a/executable/Main.hs
+++ b/executable/Main.hs
@@ -1,14 +1,15 @@
 {-# LANGUAGE ApplicativeDo #-}
 {-# LANGUAGE CPP #-}
 {-# LANGUAGE LambdaCase #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE RecordWildCards #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 
 module Main where
 
 import Control.Monad (join, msum, void, when)
 import Data.List (intersperse, (\\))
 import Data.Text (unpack)
 import qualified Data.Text.IO as TIO
 import Data.Version (parseVersion, showVersion)
@@ -318,12 +319,12 @@ showManPage = do
   manualPath <- (</> "pandoc-plot-manual.html") <$> getTemporaryDirectory
   TIO.writeFile manualPath $(embedManualHtml)
   openFile ("file:///" <> manualPath)
 
 -- | Use Doc type directly because of newline formatting
 footer' :: P.Doc
 footer' =
   mconcat
-    [ P.text "More information can be found via the manual (pandoc-plot --manual) or the",
+    [ P.pretty @String "More information can be found via the manual (pandoc-plot --manual) or the",
       P.line,
-      P.text "repository README, located at https://github.com/LaurentRDC/pandoc-plot"
+      P.pretty @String "repository README, located at https://github.com/LaurentRDC/pandoc-plot"
     ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support d2 diagrams
2 participants