marky-markdown
Advanced tools
Changelog
10.0.1 (2017-05-31)
Changelog
10.0.0 (2017-05-26)
We're fine tuning a lot of small but noticeable behavioral differences between our renderer and GitHub's, as we discover situations where GitHub differs from CommonMark. The closer we get to full GitHub compatibility, the edge-case-ier our changes become. Without a doubt, version 10 is the edge-case-fix-iest release of marky-markdown yet!
anchor
rather than deep-link
. ([pull/289])octicon
and octicon-link
rather than
deep-link-icon
. ([pull/292])aria-hidden=true
. ([pull/293])getParser
method to provide access to the underlying markdown-it parser
instance in case you want to use [custom markdown-it plugins] in your own
apps. ([pull/285], [pull/287]; see [low level parser access])[logo](/logo.png)
😄 ([pull/308])details
and summary
are now white-listed HTML tags. ([pull/333])style
attributes from img
elements. ([pull/299])Changelog
9.0.3 (2017-04-12)
Changelog
9.0.2 (2017-03-03)
highlights
to 2.1.3
because a new version of its dep fs-plus
broke Node 4 buildsChangelog
9.0.1 (2016-10-31)
Changelog
9.0.0 (2016-10-31)
marky-markdown now returns an HTML string rather than a cheerio DOM object.
With this release, we took cheerio out of the processing pipeline and replaced formerly cheerio-based operations with custom markdown-it plugins. Removing the overhead of creating a DOM object for every document speeds marky-markdown up by 15–20% on average, but it does also result in a change to the API.
So what used to be:
var marky = require('marky-markdown')
var html = marky('# Some markdown string').html()
is now:
var marky = require('marky-markdown')
var html = marky('# Some markdown string') // no longer need `.html()`
Many marky-markdown users will only need to remove the .html()
method call,
because all they needed is raw HTML anyway. For any users who do need the
cheerio DOM object, the migration path is to create the DOM object yourself:
var marky = require('marky-markdown')
var html = marky('# Some markdown string')
var cheerio = require('cheerio')
var dom = cheerio.load(html)
Cheerio, cheerio! (HT [wmhilton])
deep-link
class and generated id
slugs that
we formerly applied to heading elements themselves are added to a link we put
inside the heading. This means we no longer wrap headings' entire contents in
a link, which means we can generate an anchor for every heading, not just ones
that don't contain links to begin with. Win! (also, Mouthful!). The new-style
links contain an SVG icon that matches GitHub's hover icon; if you want to
disable it, you can pass {enableHeadingLinkIcons: false}
in marky's
options
. Big thanks to [nwhetsell] for the help! ([pull/225] by
[ashleygwilliams] and [revin])title
attributes from links and images, as well as align
attributes
from paragraphs during the rendering process, but now we handle those
correctly, so, e.g., [link](#url "title text")
turns into
<a href="#url" title="title text">link</a>
like it should, and if you have
inline HTML like <p align="center">...</p>
the alignment doesn't get
stripped. ([pull/235], [issue/241] by [kasbah], [pull/242]). The align
attribute is also supported on inline HTML <img>
elements too. ([pull/270],
[issue/269] by [revelt])# header
text to be a header if there's no
leading whitespace before the #
character (CommonMark allows up to three
leading spaces, see the specification).
Thanks, [kasbah]! ([issue/233], [pull/234])npm install
no longer
gives you the tests. They're still here, of course; you just have to clone the
repo now :smile: ([pull/223] by [ashleygwilliams])Changelog
8.1.0 (2016-08-08)
8.0.0
release, [zeke] added some scripts and docs
to make using marky with Browserify even easier. Among other things,
marky now ships with a browserified file ready to go! ([pull/211])style
attributes from <td>
and <th>
elements-
and thanks to [revin]'s hardwork, it isn't anymore!
([issues/212], [pull/216])mocha
updated to 3.0.2
([pull/219])atom-language-nginx
update to 0.6.1
, adding support for highlighting
[lua directives]! ([pull/214])Changelog
8.0.0 (2016-07-08)
Progress toward feature parity with GitHub's markdown rendering continues...
class
on: syntax highlighting now supports ES2015 ([pull/206])!
The changes to the rendered markup for highlighted JavaScript
aren't purely additive (we wish we could be more specific, but the
functionality comes from [atom/language-javascript], which currently
doesn't publish a changelog; if you're feeling particularly brave,
there's always the diff
:flushed:), so dependening on how your CSS works, there may or may
not be non-trivial work for you to dowww.example.com
but not readme.md
) so as to more closely match
how Github does it ([pull/151], [issue/146]); thanks to [puzrin]
for help working out the details<
and >
are no longer allowed in auto-linked text due to a
sub-dependency update coming in from markdown-it
(see below, also
[linkify-it/26] for details)<dl>
, <dt>
, and <dd>
elements from
embedded markup, so you can write definition lists. HOWEVER: these
are not directly supported by any particular standard Markdown
syntax; since they are treated as inline HTML, any lines indented
with four or more spaces will get rendered as code blocks as per
CommonMark; see the discussion in [issue/169]. ([pull/170]){highlightSyntax: false}
in
the options because the deepest recesses of our dependency tree
have some native C++ stuff which can't be browserified. On the
other hand, leaving out syntax highlighting cuts the final bundle
size roughly in half, so that's a win. ([pull/203]){highlightSyntax: false}
in the options,
we no longer apply the syntax highlighting-related CSS classes to
the rendered HTML; e.g., rather than
<div class="highlight js"><pre class="editor editor-colors">...</pre></div>
we will render simply <pre><code>...</code></pre>
. ([issue/162],
[pull/163])