Comments (11)
Google Code Info:
Author: [email protected]
Created On: 2008-11-06T22:23:20.000Z
from pandoc.
Unfortunately, dons says that the plugins library is no longer maintained.
Google Code Info:
Author: [email protected]
Created On: 2008-11-11T03:04:33.000Z
from pandoc.
The hint library might be an alternative to plugins. Check to see if it is actively
maintained.
Google Code Info:
Author: [email protected]
Created On: 2008-11-12T00:57:22.000Z
from pandoc.
Or mueval, for more safety.
Google Code Info:
Author: [email protected]
Created On: 2008-11-12T01:06:34.000Z
from pandoc.
Example of use of hint, in ghci:
:m + Language.Haskell.Interpreter.GHC
:m + Text.Pandoc
inp <- readFile "README"
let y = withSession ses (setImports ["Text.Pandoc","Prelude"] >> (interpret
("writeLaTeX defaultWriterOptions $ readMarkdown defaultParserState $ " ++ show inp)
(as :: Pandoc)))
y
Google Code Info:
Author: [email protected]
Created On: 2008-11-13T07:04:02.000Z
from pandoc.
Note: the example above is missing
ses <- newSession
also try this:
:m + Control.Monad.Errors
e <- withSession ses (setImports ["Prelude"] >> (catchError (interpret "(+)" (as ::
Int -> Int)) (\e -> return id)))
e 2
4
e <- withSession sess (setImports ["Prelude","Text.Pandoc"] >> (interpret
"processPandoc (const Space)" (as :: Pandoc -> Pandoc)))
e $ Pandoc (Meta [] [] []) [Para [Str "Hi",Space,Emph [Str "there"]]]
Pandoc (Meta [] [] "") [Para [Space,Space,Space]]
Google Code Info:
Author: [email protected]
Created On: 2008-11-14T07:30:47.000Z
from pandoc.
This is fun:
-- MyMod.hs
module MyMod (doit) where
import Text.Pandoc
doit :: Inline -> Inline
doit (Str x) = Str (x ++ "!")
doit x = x
-- GHCI:
GHCI> e <- withSession sess (loadModules ["MyMod"] >> setImports
["Prelude","Text.Pandoc","MyMod"] >> (catchError (interpret "processPandoc doit" (as
:: Pandoc -> Pandoc)) (\e -> throwError e >> return id)))
GHCI> e $ Pandoc (Meta [] [] []) [Para [Str "Hi",Space,Emph [Str "there"]]]
Pandoc (Meta [] [] "") [Para [Str "Hi!",Space,Emph [Str "there!"]]]
Google Code Info:
Author: [email protected]
Created On: 2008-11-14T07:44:03.000Z
from pandoc.
The newest release of hint supports GHC 6.10.
Time to get going on this!
Google Code Info:
Author: [email protected]
Created On: 2009-01-01T05:02:50.000Z
from pandoc.
Or mueval, for more safety.
Mueval might work as a library, with some modification to the internal API. But given
that the code is either A) supplied by the developers and presumably vetted and
checked; or B) written by the user who has incentive to not write evil code, mueval
may be the wrong solution.
It is also relatively inefficient compared to running Hint directly, due to the
resource-limiting, process-level and thread-level watchdogs, checks to sanitize the
code, etc. That's fine for running potentially-evil code since the alternative to
running slowly & safely is not running at all.
I would suggest Hint instead of Mueval. It is pleasant to use & Daniel Gorin has
always responded quickly to my needs (for mueval development), and I don't foresee it
being abandoned anytime soon. (It certainly is currently a better solution than
hs-plugins inasmuch as the latter does not even work on 6.10.)
Google Code Info:
Author: [email protected]
Created On: 2009-01-23T21:47:21.000Z
from pandoc.
Actually, I've already got all the plugin stuff written, using hint.
I've just been waiting for Daniel to upload the latest version (which
he did today), since the old version didn't cabal install under ghc 6.8.
So you should see the plugin stuff, including some worked-out examples,
in the repository before too long!
Google Code Info:
Author: [email protected]
Created On: 2009-01-24T02:29:59.000Z
from pandoc.
Added as of r1526.
Google Code Info:
Author: [email protected]
Created On: 2009-01-24T20:01:26.000Z
from pandoc.
Related Issues (20)
- man writer: syntax highlighting HOT 1
- Footnotes in title block in HTML HOT 1
- Parameters from wrapfig command end up in document (latex to docx) HOT 3
- Compatibility with micromark's nested directive syntax
- rst to gfm generates wrong title HOT 2
- Typst writer: native citations don't follow markdown citation formats HOT 1
- Allow new lines in wikilink title. HOT 1
- --reference-location=section and --reference-location=block cause duplicate footnote section ids HOT 3
- Man Writer fails to display urls with more than 68 characters HOT 1
- (Regression) pandoc leaves temporary directory behind HOT 13
- Support of custom documentClass(.cls file) for Latex to Html conversion HOT 4
- pandoc fails to wrap math correctly when generating pptx in unusual places HOT 1
- typst: table colspan not supported HOT 1
- SVG Self-contained fix insufficient in #9420 HOT 1
- ePub v2 fails validation with ePubCheck in pandoc 3.1.12 - worked previously HOT 9
- improve error message with typo {{< var country>}} (no space) HOT 1
- pandoc .tex > .epub : more errors HOT 1
- lang: de-DE and lang=de don't work together for LaTeX HOT 2
- Latex: `header-includes:` works via `--metadata-file` but not via `--metadata` HOT 1
- Support GFM alerts (admonitions) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandoc.