Socket
Socket
Sign inDemoInstall

marky-markdown

Package Overview
Dependencies
145
Maintainers
5
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1345
8Next

10.1.1

Diff

Changelog

Source

10.1.1 (2017-06-02)

Bug Fixes

  • convert ES6 template string to ES5; gets the browserify bundle working (3b16ea9)

<a name="10.1.0"></a>

bcoe
published 10.1.0 •

Changelog

Source

10.1.0 (2017-06-02)

Features

  • classes attached to anchor and svg in headings can now be configured (f7a0883)

<a name="10.0.1"></a>

revin
published 10.0.1 •

Changelog

Source

10.0.1 (2017-05-31)

  • Fix the browserify build, which had broken due to the inclusion of some ES6+ code. ([pull/372])
revin
published 10.0.0 •

Changelog

Source

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!

Breaking Changes

  • links generated in headers are created differently:
    • links now use class anchor rather than deep-link. ([pull/289])
    • SVG icons in links now use class octicon and octicon-link rather than deep-link-icon. ([pull/292])
    • headings now have aria-hidden=true. ([pull/293])
  • we no longer do special processing on badge images. ([pull/303])
  • any options provided must now be an object. ([pull/323])
  • ids in user generated HTML are now prefixed. ([pull/358])

Features

  • spaces are now supported in image and url paths, thanks [sjking]! ([pull/280])
  • new 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])
  • marky-markdown now understands relative GitHub links, e.g., [logo](/logo.png) 😄 ([pull/308])
  • support for spaces between link labels and paths. ([pull/329])
  • details and summary are now white-listed HTML tags. ([pull/333])
  • support for GitHub repos that have no master branch. thanks [zkat]! ([pull/351])
  • security: ids in user generated HTML are now prefixed. ([pull/358])
  • add debug information to footer if debug is enabled. ([pull/346])
  • support string repository shorthand in package.json. ([pull/369])

Fixes

  • stop stripping style attributes from img elements. ([pull/299])
  • HTML blocks are no longer greedy. ([pull/325])
  • syntax highlighting no longer applied if no language is specified in code block. ([pull/327])
  • headings can now interrupt paragraphs, and will be rendered appropriately. ([pull/326])
  • markdown-it now properly renders tables with internal code blocks. ([pull/316])
  • fix bug with relative images and links. ([pull/323])
  • enforce that if options are passed, they must be an object. ([pull/323])
ag_dubs
published 9.0.3 •

Changelog

Source

9.0.3 (2017-04-12)

Bug Fix! 🐛

  • Updated sanitization to ensure that user-generated ids that are in HTML blocks are also prefixed. ([pull/357])
ag_dubs
published 9.0.2 •

Changelog

Source

9.0.2 (2017-03-03)

Dependencies

  • Bumped highlights to 2.1.3 because a new version of its dep fs-plus broke Node 4 builds
revin
published 9.0.1 •

Changelog

Source

9.0.1 (2016-10-31)

Bug Fix! 🐞

  • Fixed a bug in our CLI script that appeared because we forgot to update it to account for the breaking API change in v9, lololol. Thanks to [sjking] for coming to the rescue! ([pull/276])
revin
published 9.0.0 •

Changelog

Source

9.0.0 (2016-10-31)

Breaking API Change

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])

Other Changes in this Release

  • Node 6 support! We've been blocked on supporting node 6.x for quite a while now ([issue/176]), but thanks to some upstream work (here and here), the blocker has been removed, and now you can use marky in The Future™. ([pull/227] by [ashleygwilliams])
  • Node 0.10 dev environment no longer supported We've updated our devDependency on JS Standard to 8.x which no longer supports Node 0.10 and 0.12. Node 0.10 is being EOLd this year, and as a result, we feel ok no longer supporting them as development environments. You can still use marky using 0.10, but if you want to develop it, you'll need to upgrade to Node 4 or later. ([pull/239] by Greenkeeper)
  • More GitHub-like heading rendering! Working out a solution for [issue/224] led us down a path that resulted in our generated headings getting closer to what GitHub renders. Now the 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])
  • More GitHub-like link/image/paragraph rendering! Oops, we were stripping out 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])
  • Even more GitHub-like heading rendering! [kasbah] clued us into the fact that GitHub only considers # 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])
  • Faster parsing! As above: no more cheerio. ([pull/246], [pull/251] by [revin])
  • Leaner published package! We used to ship marky with the unit test suite included, but now it's in our [npm ignore] file, so 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])
  • Git repository cleanup! We were getting tired of dealing with merge conflicts in our browserify bundle, so in response to [issue/262], [karanjthakkar] heroically submitted [pull/271] to help us make our development experience nicer (now the bundle is in the published package, but not tracked by git). Thank you!
ag_dubs
published 8.1.0 •

Changelog

Source

8.1.0 (2016-08-08)

New Features

  • Browserify- now easier than before! Following up on [wmhilton]'s work from our 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])

Bug Fixes

  • Table troubles be gone! Or at least, any troubles with text-alignment. Marky was stripping style attributes from <td> and <th> elements- and thanks to [revin]'s hardwork, it isn't anymore! ([issues/212], [pull/216])

Docs

  • A slightly new and reogranized README- refocused to make it easier for potential users of marky to learn about what marky does and wants to do! ([pull/221])

Dependencies

  • mocha updated to 3.0.2 ([pull/219])
  • atom-language-nginx update to 0.6.1, adding support for highlighting [lua directives]! ([pull/214])
ag_dubs
published 8.0.0 •

Changelog

Source

8.0.0 (2016-07-08)

Progress toward feature parity with GitHub's markdown rendering continues...

New Features / Breaking Changes

  • get your 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 do
  • changed the way certain links are auto-generated (i.e., linkifying www.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)
  • we now allow [link reference definitions] to appear immediately following paragraphs rather than requiring a blank link in between them; this contradicts CommonMark but matches Github's behavior. ([issue/159], [pull/164])
  • we now support Github flavored markdown [task lists] in markdown documents. ([issue/166], [pull/168])
  • we no longer strip HTML <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])
  • big thanks to [wmhilton] who swooped in out of the blue and made it so marky now works in a web browser! :tada: :tada: :tada: Unfortunately, you have to specify {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])
  • if you invoke marky with {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])
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc