@accordproject/markdown-transform
API for transforming markdown data
Last updated 12 days ago by jsimeon .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @accordproject/markdown-transform 
SYNC missed versions from official npm registry.

Markdown Transform API

High-level API to transform markdown into different formats.

Installation

npm install -g @accordproject/markdown-transform

Basic Usage

const transform = require('@accordproject/markdown-transform').transform;

// convert a markdown string to an html string
//   first argument is the markdown string to be converted
//   second argument is the source format
//   third argument is an array of destination formats to pass through
const htmlString = await transform(markdownString, 'markdown', ['html']);
console.log(htmlString);

Note that the call to transform returns a Promise.

The third argument to the transform function can be used to force the transform to visit an optional intermediate format. For example, passing ['ciceromark_noquotes','html'] will transform the source to ciceromark_noquotes followed by all the transformations necessary to transform from ciceromark_noquotes to html.

The example below transforms input markdown, stripping quotes from around variables, and then converts to HTML.

const result = await transform(acceptanceCiceroEdit, 'markdown', ['ciceromark_noquotes','html']);

Transformation Graph

You can generate a PlantUML state diagram for the supported transformations using the following code:

const generateTransformationDiagram = require('@accordproject/markdown-transform').generateTransformationDiagram;
const plantUMLStateDiagram = generateTransformationDiagram();

The diagram below (showing all supported transformations) is automatically generated by ./scripts/generateDiagram.js.

Transforms

License

Accord Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file. Accord Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/.

© 2017-2019 Clause, Inc.

Current Tags

  • 0.11.3                                ...           latest (12 days ago)
  • 0.11.4-20200602145104                                ...           unstable (19 hours ago)

114 Versions

  • 0.11.4-20200602145104                                ...           19 hours ago
  • 0.11.4-20200602144131                                ...           19 hours ago
  • 0.11.4-20200530175112                                ...           4 days ago
  • 0.11.4-20200528043045                                ...           6 days ago
  • 0.11.4-20200528033953                                ...           6 days ago
  • 0.11.4-20200526224928                                ...           7 days ago
  • 0.11.4-20200526160648                                ...           8 days ago
  • 0.11.4-20200523182021                                ...           11 days ago
  • 0.11.4-20200523052740                                ...           11 days ago
  • 0.11.4-20200523014133                                ...           11 days ago
  • 0.11.4-20200522213859                                ...           12 days ago
  • 0.11.3                                ...           12 days ago
  • 0.11.3-20200522213409                                ...           12 days ago
  • 0.11.3-20200522155017                                ...           12 days ago
  • 0.11.3-20200521230806                                ...           12 days ago
  • 0.11.3-20200521172510                                ...           13 days ago
  • 0.11.3-20200521001914                                ...           13 days ago
  • 0.11.3-20200520222959                                ...           13 days ago
  • 0.11.3-20200520200138                                ...           14 days ago
  • 0.11.3-20200520183539                                ...           14 days ago
  • 0.11.3-20200520174111                                ...           14 days ago
  • 0.11.3-20200520153627                                ...           14 days ago
  • 0.11.3-20200519212611                                ...           15 days ago
  • 0.11.3-20200519172727                                ...           15 days ago
  • 0.11.3-20200519142417                                ...           15 days ago
  • 0.11.3-20200519141304                                ...           15 days ago
  • 0.11.3-20200519135953                                ...           15 days ago
  • 0.11.3-20200519135526                                ...           15 days ago
  • 0.11.3-20200519052359                                ...           15 days ago
  • 0.11.3-20200518231720                                ...           15 days ago
  • 0.11.3-20200518223850                                ...           15 days ago
  • 0.11.3-20200518205154                                ...           16 days ago
  • 0.11.3-20200518173830                                ...           16 days ago
  • 0.11.3-20200518171107                                ...           16 days ago
  • 0.11.3-20200508163824                                ...           a month ago
  • 0.11.3-20200507221145                                ...           a month ago
  • 0.11.3-20200507220320                                ...           a month ago
  • 0.11.3-20200507165254                                ...           a month ago
  • 0.11.3-20200507151446                                ...           a month ago
  • 0.11.3-20200507073248                                ...           a month ago
  • 0.11.3-20200504175944                                ...           a month ago
  • 0.11.3-20200502235247                                ...           a month ago
  • 0.11.3-20200501035547                                ...           a month ago
  • 0.11.3-20200501034440                                ...           a month ago
  • 0.11.3-20200501032727                                ...           a month ago
  • 0.11.3-20200430165524                                ...           a month ago
  • 0.11.3-20200430024841                                ...           a month ago
  • 0.11.3-20200430024259                                ...           a month ago
  • 0.11.3-20200429185617                                ...           a month ago
  • 0.11.3-20200428153849                                ...           a month ago
  • 0.11.3-20200427211520                                ...           a month ago
  • 0.11.2                                ...           a month ago
  • 0.11.2-20200427211100                                ...           a month ago
  • 0.11.2-20200427182720                                ...           a month ago
  • 0.11.2-20200427181207                                ...           a month ago
  • 0.11.2-20200427172247                                ...           a month ago
  • 0.11.2-20200425033057                                ...           a month ago
  • 0.11.2-20200425032633                                ...           a month ago
  • 0.11.2-20200425031413                                ...           a month ago
  • 0.11.2-20200425024207                                ...           a month ago
  • 0.11.2-20200425023617                                ...           a month ago
  • 0.11.2-20200425023111                                ...           a month ago
  • 0.11.2-20200425020854                                ...           a month ago
  • 0.11.2-20200424223959                                ...           a month ago
  • 0.11.1                                ...           a month ago
  • 0.11.1-20200424223412                                ...           a month ago
  • 0.11.1-20200424222528                                ...           a month ago
  • 0.11.1-20200424222414                                ...           a month ago
  • 0.11.1-20200424220743                                ...           a month ago
  • 0.11.1-20200424220448                                ...           a month ago
  • 0.10.5-20200423204847                                ...           a month ago
  • 0.11.1-20200423150224                                ...           a month ago
  • 0.11.0                                ...           a month ago
  • 0.10.5-20200423144122                                ...           a month ago
  • 0.10.5-20200423042326                                ...           a month ago
  • 0.10.5-20200423041628                                ...           a month ago
  • 0.10.5-20200423033112                                ...           a month ago
  • 0.10.5-20200421141857                                ...           a month ago
  • 0.10.5-20200420165956                                ...           a month ago
  • 0.10.5-20200420162323                                ...           a month ago
  • 0.10.5-20200418171856                                ...           2 months ago
  • 0.10.5-20200418152247                                ...           2 months ago
  • 0.1.16-20190911170330                                ...           9 months ago
  • 0.1.15                                ...           9 months ago
  • 0.1.15-20190911165743                                ...           9 months ago
  • 0.1.15-20190911143213                                ...           9 months ago
  • 0.1.14                                ...           9 months ago
  • 0.1.14-20190911142721                                ...           9 months ago
  • 0.1.14-20190911043109                                ...           9 months ago
  • 0.1.13                                ...           9 months ago
  • 0.1.13-20190911042508                                ...           9 months ago
  • 0.1.13-20190910013730                                ...           9 months ago
  • 0.1.12                                ...           9 months ago
  • 0.1.12-20190910013350                                ...           9 months ago
  • 0.1.12-20190903185030                                ...           9 months ago
  • 0.1.11                                ...           9 months ago
  • 0.1.11-20190903184401                                ...           9 months ago
  • 0.1.11-20190903182707                                ...           9 months ago
  • 0.1.10                                ...           9 months ago
  • 0.1.10-20190903181945                                ...           9 months ago
  • 0.1.10-20190903143030                                ...           9 months ago
  • 0.1.10-20190828183750                                ...           9 months ago
  • 0.1.9                                ...           9 months ago
  • 0.1.9-20190828182748                                ...           9 months ago
  • 0.1.8                                ...           9 months ago
  • 0.1.7                                ...           9 months ago
  • 0.1.6                                ...           9 months ago
  • 0.1.5                                ...           10 months ago
  • 0.1.4                                ...           10 months ago
  • 0.1.3                                ...           10 months ago
  • 0.1.2                                ...           10 months ago
  • 0.1.1                                ...           10 months ago
  • 0.1.0                                ...           10 months ago
  • 0.0.1                                ...           10 months ago

Copyright 2014 - 2016 © taobao.org |