1 | # CiceroMark Transform
|
2 |
|
3 | This package extends CommonMark to introduce three new DOM nodes:
|
4 | 1. Clause
|
5 | 2. Variable
|
6 | 3. ComputedVariable
|
7 |
|
8 | These are expressed using markdown code blocks and html inlines to ensure that they are safely persisted within markdown text.
|
9 |
|
10 | Use `CiceroMarkTransform` to map from the CommonMark DOM nodes to CiceroMark DOM nodes.
|
11 |
|
12 | ## Installation
|
13 |
|
14 | ```
|
15 | npm install @accordproject/markdown-cicero --save
|
16 | ```
|
17 |
|
18 | ## Usage
|
19 |
|
20 | ``` javascript
|
21 |
|
22 | const CiceroMarkTransformer = require('@accordproject/markdown-cicero').CiceroMarkTransformer;
|
23 |
|
24 | const ciceroMarkTransformer = new CiceroMarkTransformer();
|
25 | const dom = ciceroMarkTransformer.fromMarkdown( '# Heading One');
|
26 | const newMarkdown = ciceroMarkTransformer.toMarkdown(dom);
|
27 | ```
|
28 |
|
29 | ## License <a name="license"></a>
|
30 | 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/.
|
31 |
|
32 | © 2017-2019 Clause, Inc.
|