dikmax / mdown Goto Github PK
View Code? Open in Web Editor NEWFast CommonMark-compliant Markdown parser.
Home Page: https://pub.dartlang.org/packages/md_proc
License: BSD 3-Clause "New" or "Revised" License
Fast CommonMark-compliant Markdown parser.
Home Page: https://pub.dartlang.org/packages/md_proc
License: BSD 3-Clause "New" or "Revised" License
Hi, I use md_proc following the basic usage:
print(markdownToHtml('# Hello world!'));
but It does not work for table ,could you please figure out how to enable the fucntion for table.
thanks
@dikmax I'm using your math extension now on my website, works great ๐
I have one other feature request. Many mathematicians also use \begin{...} \end{...}
kind of code blocks. For example \begin{matrix}, \begin{align} etc. Those are supported by some markdown flavours, for example the one used at math.stackexchange.com.
Would be great if md_proc could also escape markdown for those blocks (and mark as <span class="math display">
).
A workaround that is now possible, is to use $$...$$
around the equation, see:
http://kasperpeulen.github.io/mathedit/#/gist/097f6d551598a3a8487f
But I think people are so used to not having to do that from standard latex, math.stackexchange etc., so an extension would be great.
This seems like a very nice markdown parser. Is it possible to define some extension ? I have some troubles parsing documentation from dart (dartdoc
) with this parser, as dartdoc uses some non-standard markdown. For example the [myArg]
notation.
But anyway, seems like excellent work ! ๐
As the title suggest this issue is about using a css prefix in md_proc to avoid any potential bugs that can come from using common names such as display
or math
.
My first idea for a css class prefix names would md-
or md-proc-
to avoid any potential collisions.
See issue #13 for more discussion.
Hi,
I was curious about what you're using package:parsers for and found this project (nice project!). I remarked that you implemented maps and iterable comparison functions, which are available in this (google-maintained) package already: http://pub.dartlang.org/packages/collection.
Also if you're porting Haskell code you might be interested in some of my other projects: persistent efficient immutable lists, maps and sets, propcheck a quickcheck/smallcheck test library which uses a port of testing-feat for generating enumerations, adts for generating Dart classes from algebraic datatype declarations, and pretty a port of wl-pprint.
Hi Maxim and thanks for implementing this package, it seem very nice.
I started using it now and ran into some issues with "Smart punctuation" and Dart's default encoding (Latin 1). It was a hard to find the issue because you only get a somewhat random error but after some debugging I realized that Latin 1 is the default encoding (for Dart:io HttpClientRequest) and it simply does not have "smart quotes", see comment 4 here: http://stackoverflow.com/a/9282615
What I had to do to get things working was to explicitly set the charset like this on the headers:
res.headers.contentType = new ContentType("text", "html", charset: "utf-8");
Now it works without errors and I can render commonmark with md_proc server side and then send the output directly to a client.
This is not a bug per say in md_proc, but I think this might be common enough that it's worth documenting somewhere. Not sure exactly where, but maybe some small note in the readme on smart punctuation that if you plan to write that output to a HttpClientRequest you need to set the encoding explicitly to utf-8 or some other charset that supports smart quotes.
Cheers, Robert
Would it be possible to have an extension that doesn't process math blocks (that could be rendered by mathjax afterwards) ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.