Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@atjson/renderer-commonmark

Package Overview
Dependencies
Maintainers
4
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atjson/renderer-commonmark - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0

27

CHANGELOG.md

@@ -6,2 +6,29 @@ # Change Log

## [0.11.0](https://github.com/CondeNast-Copilot/atjson/compare/@atjson/renderer-commonmark@0.10.0...@atjson/renderer-commonmark@0.11.0) (2018-10-22)
### ✨ New Features
* ✨👑✨ Make Annotations classes instead of JS objects ([#57](https://github.com/CondeNast-Copilot/atjson/issues/57))
### 🚨 Breaking Changes
* This introduces a bunch of breaking changes to AtJSON. The major change is that Annotations are now described as classes instead of a loose schema.
A summary of changes are the following:
⚠️ `@atjson/schema` is now deprecated. Instead of using the schema, instead use `@atjson/offset-annotations`, which provides a library of annotations that closely resemble those provided by `@atjson/schema`
🃏 Schemas are now defined on a document subclass. The schema is a list of annotation classes that are used to identify annotations in the document.
🛸 Any annotations not found in the schema are identified as `unknown` annotations. These annotations are available to be read and updated like any other annotation, but may have incorrect transform behavior because the text transform behavior is undefined. The default behavior should be acceptable for most cases.
🕵🏾‍♀️ `id`s are required property on Annotations. This is used to identify annotations for speedy updating for Offset
🖍 Annotations are now prefixed at rest. For the CommonMark Link annotation, it will be stored as `-commonmark-link` as the `type` and the attributes will be prefixed with `-commonmark` as well, meaning that instead of seeing `href` in the `attributes`, you will see `-commonmark-href`. When the annotation JSON is hydrated into an annotation class, prefixes are automatically removed. This prevents any collisions that may (and will) happen when converting between document types.
🎨 Renderers now take `Annotation`s instead of the `attributes`. When additional context is required to render an annotation, a `context` object is passed as the second argument, which provides references to the `parent`, `next`, `previous`, and `children` annotations to the current annotation.
## [0.10.0](https://github.com/CondeNast-Copilot/atjson/compare/@atjson/renderer-commonmark@0.9.4...@atjson/renderer-commonmark@0.10.0) (2018-10-10)

@@ -8,0 +35,0 @@

34

dist/commonjs/index.d.ts

@@ -1,32 +0,22 @@

import Document from '@atjson/document';
import { HIR } from '@atjson/hir';
import { Bold, Code, HTML, Heading, Image, Italic, Link, List } from '@atjson/offset-annotations';
import Renderer, { Context } from '@atjson/renderer-hir';
export declare function split(): Iterable<any>;
export declare type CodeStyle = 'block' | 'inline' | 'fence';
export interface Annotation {
type: string;
attributes: any;
previous: Annotation | null;
next: Annotation | null;
parent: Annotation | null;
text?: string;
children: Annotation[];
}
export default class CommonmarkRenderer {
export default class CommonmarkRenderer extends Renderer {
state: any;
constructor();
text(text: string): string;
'bold'(node: Annotation): Iterable<any>;
'root'(): IterableIterator<any>;
'bold'(_bold: Bold, context: Context): Iterable<any>;
'blockquote'(): Iterable<any>;
'heading'(node: Annotation): Iterable<any>;
'heading'(heading: Heading): Iterable<any>;
'horizontal-rule'(): Iterable<any>;
'image'(node: Annotation): Iterable<any>;
'italic'(node: Annotation): Iterable<any>;
'image'(image: Image): Iterable<any>;
'italic'(_italic: Italic, context: Context): Iterable<any>;
'line-break'(): Iterable<any>;
'link'(node: Annotation): Iterable<any>;
'code'(node: Annotation): Iterable<any>;
'html'(node: Annotation): Iterable<any>;
'link'(link: Link): Iterable<any>;
'code'(code: Code, context: Context): Iterable<any>;
'html'(html: HTML): Iterable<any>;
'list-item'(): Iterable<any>;
'list'(node: Annotation): Iterable<any>;
'list'(list: List, context: Context): Iterable<any>;
'paragraph'(): Iterable<any>;
render(document: Document | HIR): string;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const hir_1 = require("@atjson/hir");
const offset_annotations_1 = require("@atjson/offset-annotations");
const renderer_hir_1 = require("@atjson/renderer-hir");
function* split() {
let text = yield;
let rawText = yield;
let text = rawText.join('');
let start = 0;

@@ -60,60 +62,5 @@ let end = text.length;

}
function hirNodeToMarkdownNode(node, parent) {
let markdownNode = {
type: node.type,
attributes: node.attributes || {},
parent,
previous: null,
next: null,
text: node.text,
children: []
};
markdownNode.children.push(...node.children().map((childNode) => {
return hirNodeToMarkdownNode(childNode, markdownNode);
}));
return markdownNode;
}
function render(renderer, node, index) {
if (node.parent && index > 0) {
node.previous = node.parent.children[index - 1];
}
if (node.parent && index < node.parent.children.length) {
node.next = node.parent.children[index + 1];
}
node.attributes = Object.keys(node.attributes).reduce((attrs, key) => {
let value = node.attributes[key];
if (value instanceof hir_1.HIR) {
attrs[key] = render(renderer, hirNodeToMarkdownNode(value.rootNode, null), -1);
}
else {
attrs[key] = value;
}
return attrs;
}, {});
let factory = renderer[node.type];
let generator;
if (factory) {
generator = factory.call(renderer, node);
let result = generator.next();
if (result.done) {
return result.value;
}
}
let fragment = node.children.map((childNode, idx) => {
if (childNode.type === 'text' && typeof childNode.text === 'string') {
return renderer.text(childNode.text);
}
else {
return render(renderer, childNode, idx);
}
}).join('');
if (generator) {
return generator.next(fragment).value;
}
else {
return fragment;
}
}
class CommonmarkRenderer {
class CommonmarkRenderer extends renderer_hir_1.default {
constructor() {
super();
this.state = {};

@@ -127,3 +74,7 @@ }

}
*'bold'(node) {
*'root'() {
let rawText = yield;
return rawText.join('');
}
*'bold'(_bold, context) {
let [before, text, after] = yield* split();

@@ -134,4 +85,3 @@ if (text.length === 0) {

else {
if (node.parent && !node.previous && !node.next &&
node.parent.type === 'italic') {
if (!context.previous && !context.next && context.parent instanceof offset_annotations_1.Italic) {
return `${before}__${text}__${after}`;

@@ -144,3 +94,3 @@ }

let text = yield;
let lines = text.split('\n');
let lines = text.join('').split('\n');
let endOfQuote = lines.length;

@@ -158,14 +108,15 @@ let startOfQuote = 0;

}
*'heading'(node) {
let heading = yield;
let level = new Array(node.attributes.level + 1).join('#');
if (heading.indexOf('\n') !== -1) {
if (node.attributes.level === 1) {
return `${heading}\n====\n`;
*'heading'(heading) {
let rawText = yield;
let text = rawText.join('');
let level = new Array(heading.attributes.level + 1).join('#');
if (text.indexOf('\n') !== -1) {
if (heading.attributes.level === 1) {
return `${text}\n====\n`;
}
else if (node.attributes.level === 2) {
return `${heading}\n----\n`;
else if (heading.attributes.level === 2) {
return `${text}\n----\n`;
}
}
return `${level} ${heading}\n`;
return `${level} ${text}\n`;
}

@@ -175,10 +126,10 @@ *'horizontal-rule'() {

}
*'image'(node) {
if (node.attributes.title) {
let title = node.attributes.title.replace(/"/g, '\\"');
return `![${node.attributes.description}](${node.attributes.url} "${title}")`;
*'image'(image) {
if (image.attributes.title) {
let title = image.attributes.title.replace(/"/g, '\\"');
return `![${this.render(image.attributes.description)}](${image.attributes.url} "${title}")`;
}
return `![${node.attributes.description}](${node.attributes.url})`;
return `![${this.render(image.attributes.description)}](${image.attributes.url})`;
}
*'italic'(node) {
*'italic'(_italic, context) {
let state = Object.assign({}, this.state);

@@ -193,5 +144,5 @@ this.state.isItalicized = true;

let markup = state.isItalicized ? '_' : '*';
let hasWrappingBoldMarkup = node.parent && !node.previous && !node.next && node.parent.type === 'bold';
let hasAdjacentBoldMarkup = (node.next && node.next.type === 'bold' && after.length === 0) ||
(node.previous && node.previous.type === 'bold' && before.length === 0);
let hasWrappingBoldMarkup = !context.previous && !context.next && context.parent instanceof offset_annotations_1.Bold;
let hasAdjacentBoldMarkup = (context.next instanceof offset_annotations_1.Bold && after.length === 0) ||
(context.previous instanceof offset_annotations_1.Bold && before.length === 0);
if (hasWrappingBoldMarkup || hasAdjacentBoldMarkup) {

@@ -206,7 +157,7 @@ markup = '_';

}
*'link'(node) {
*'link'(link) {
let [before, text, after] = yield* split();
let url = escapeAttribute(node.attributes.url);
if (node.attributes.title) {
let title = node.attributes.title.replace(/"/g, '\\"');
let url = escapeAttribute(link.attributes.url);
if (link.attributes.title) {
let title = link.attributes.title.replace(/"/g, '\\"');
return `${before}[${text}](${url} "${title}")${after}`;

@@ -216,43 +167,45 @@ }

}
*'code'(node) {
*'code'(code, context) {
let state = Object.assign({}, this.state);
Object.assign(this.state, { isPreformatted: true, htmlSafe: true });
let code = yield;
let rawText = yield;
let text = rawText.join('');
this.state = state;
if (node.attributes.style === 'fence') {
code = '\n' + code;
let info = node.attributes.info || '';
if (code.attributes.style === 'fence') {
text = '\n' + text;
let info = code.attributes.info || '';
let newlines = '\n';
if (this.state.isList && node.next) {
if (this.state.isList && context.next) {
newlines += '\n';
}
if (code.indexOf('```') !== -1) {
return `~~~${info}${code}~~~${newlines}`;
if (text.indexOf('```') !== -1) {
return `~~~${info}${text}~~~${newlines}`;
}
else {
return `\`\`\`${info}${code}\`\`\`${newlines}`;
return `\`\`\`${info}${text}\`\`\`${newlines}`;
}
}
else if (node.attributes.style === 'block') {
return code.split('\n').map((line) => ` ${line}`).join('\n') + '\n';
else if (code.attributes.style === 'block') {
return text.split('\n').map((line) => ` ${line}`).join('\n') + '\n';
}
else {
if (code.length === 0) {
if (text.length === 0) {
return '` `';
}
else {
let backticks = '`'.repeat(getNumberOfRequiredBackticks(code));
return `${backticks}${code}${backticks}`;
let backticks = '`'.repeat(getNumberOfRequiredBackticks(text));
return `${backticks}${text}${backticks}`;
}
}
}
*'html'(node) {
*'html'(html) {
let state = Object.assign({}, this.state);
Object.assign(this.state, { isPreformatted: true, htmlSafe: true });
let html = yield;
let rawText = yield;
let text = rawText.join('');
this.state = state;
if (node.attributes.type === 'block') {
return html + '\n';
if (html.attributes.style === 'block') {
return text + '\n';
}
return html;
return text;
}

@@ -268,3 +221,4 @@ *'list-item'() {

let indent = ' '.repeat(marker.length + 1);
let item = yield;
let text = yield;
let item = text.join('');
let firstCharacter = 0;

@@ -286,45 +240,43 @@ while (item[firstCharacter] === ' ')

}
*'list'(node) {
*'list'(list, context) {
let start = 1;
if (node.attributes.startsAt != null) {
start = node.attributes.startsAt;
if (list.attributes.startsAt != null) {
start = list.attributes.startsAt;
}
let delimiter = '';
if (node.attributes.type === 'numbered') {
if (list.attributes.type === 'numbered') {
delimiter = '.';
if (node.previous &&
node.previous.type === 'list' &&
node.previous.attributes.type === 'numbered' &&
node.previous.attributes.delimiter === '.') {
if (context.previous instanceof offset_annotations_1.List &&
context.previous.attributes.type === 'numbered' &&
context.previous.attributes.delimiter === '.') {
delimiter = ')';
}
}
else if (node.attributes.type === 'bulleted') {
else if (list.attributes.type === 'bulleted') {
delimiter = '-';
if (node.previous &&
node.previous.type === 'list' &&
node.previous.attributes.type === 'bulleted' &&
node.previous.attributes.delimiter === '-') {
if (context.previous instanceof offset_annotations_1.List &&
context.previous.attributes.type === 'bulleted' &&
context.previous.attributes.delimiter === '-') {
delimiter = '+';
}
}
node.attributes.delimiter = delimiter;
list.attributes.delimiter = delimiter;
let state = Object.assign({}, this.state);
let hasCodeBlockFollowing = node.next &&
node.next.type === 'code' &&
node.next.attributes.style === 'block';
let hasCodeBlockFollowing = context.next instanceof offset_annotations_1.Code &&
context.next.attributes.style === 'block';
Object.assign(this.state, {
isList: true,
type: node.attributes.type,
type: list.attributes.type,
digit: start,
delimiter,
tight: node.attributes.tight,
tight: list.attributes.tight,
hasCodeBlockFollowing
});
let list = yield;
let text = yield;
this.state = state;
return list + '\n';
return text.join('') + '\n';
}
*'paragraph'() {
let text = yield;
let rawText = yield;
let text = rawText.join('');
if (!text.match(/^\s+$/g)) {

@@ -338,14 +290,4 @@ text = text.replace(/^\s+/g, '').replace(/\s+$/g, '');

}
render(document) {
let graph;
if (document instanceof hir_1.HIR) {
graph = document;
}
else {
graph = new hir_1.HIR(document);
}
return render(this, hirNodeToMarkdownNode(graph.rootNode, null), -1);
}
}
exports.default = CommonmarkRenderer;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSxxQ0FBMkM7QUFFM0MsUUFBZSxDQUFDLENBQUMsS0FBSztJQUNwQixJQUFJLElBQUksR0FBRyxLQUFLLENBQUM7SUFDakIsSUFBSSxLQUFLLEdBQUcsQ0FBQyxDQUFDO0lBQ2QsSUFBSSxHQUFH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SxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLENBQUM7UUFNNUIsSUFBSSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxDQUFDLEVBQUU7WUFDekIsSUFBSSxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUMsT0FBTyxFQUFFLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUM7U0FDdkQ7UUFFRCxJQUFJLElBQUksQ0FBQyxLQUFLLENBQUMsS0FBSyxFQUFFO1lBQ3BCLE9BQU8sSUFBSSxHQUFHLElBQUksQ0FBQztTQUNwQjtRQUNELE9BQU8sSUFBSSxHQUFHLE1BQU0sQ0FBQztJQUN2QixDQUFDO0NBQ0Y7QUF4VUQscUNBd1VDIn0=

@@ -1,32 +0,22 @@

import Document from '@atjson/document';
import { HIR } from '@atjson/hir';
import { Bold, Code, HTML, Heading, Image, Italic, Link, List } from '@atjson/offset-annotations';
import Renderer, { Context } from '@atjson/renderer-hir';
export declare function split(): Iterable<any>;
export declare type CodeStyle = 'block' | 'inline' | 'fence';
export interface Annotation {
type: string;
attributes: any;
previous: Annotation | null;
next: Annotation | null;
parent: Annotation | null;
text?: string;
children: Annotation[];
}
export default class CommonmarkRenderer {
export default class CommonmarkRenderer extends Renderer {
state: any;
constructor();
text(text: string): string;
'bold'(node: Annotation): Iterable<any>;
'root'(): IterableIterator<any>;
'bold'(_bold: Bold, context: Context): Iterable<any>;
'blockquote'(): Iterable<any>;
'heading'(node: Annotation): Iterable<any>;
'heading'(heading: Heading): Iterable<any>;
'horizontal-rule'(): Iterable<any>;
'image'(node: Annotation): Iterable<any>;
'italic'(node: Annotation): Iterable<any>;
'image'(image: Image): Iterable<any>;
'italic'(_italic: Italic, context: Context): Iterable<any>;
'line-break'(): Iterable<any>;
'link'(node: Annotation): Iterable<any>;
'code'(node: Annotation): Iterable<any>;
'html'(node: Annotation): Iterable<any>;
'link'(link: Link): Iterable<any>;
'code'(code: Code, context: Context): Iterable<any>;
'html'(html: HTML): Iterable<any>;
'list-item'(): Iterable<any>;
'list'(node: Annotation): Iterable<any>;
'list'(list: List, context: Context): Iterable<any>;
'paragraph'(): Iterable<any>;
render(document: Document | HIR): string;
}

@@ -1,4 +0,6 @@

import { HIR } from '@atjson/hir';
import { Bold, Code, Italic, List } from '@atjson/offset-annotations';
import Renderer from '@atjson/renderer-hir';
export function* split() {
let text = yield;
let rawText = yield;
let text = rawText.join('');
let start = 0;

@@ -57,60 +59,5 @@ let end = text.length;

}
function hirNodeToMarkdownNode(node, parent) {
let markdownNode = {
type: node.type,
attributes: node.attributes || {},
parent,
previous: null,
next: null,
text: node.text,
children: []
};
markdownNode.children.push(...node.children().map((childNode) => {
return hirNodeToMarkdownNode(childNode, markdownNode);
}));
return markdownNode;
}
function render(renderer, node, index) {
if (node.parent && index > 0) {
node.previous = node.parent.children[index - 1];
}
if (node.parent && index < node.parent.children.length) {
node.next = node.parent.children[index + 1];
}
node.attributes = Object.keys(node.attributes).reduce((attrs, key) => {
let value = node.attributes[key];
if (value instanceof HIR) {
attrs[key] = render(renderer, hirNodeToMarkdownNode(value.rootNode, null), -1);
}
else {
attrs[key] = value;
}
return attrs;
}, {});
let factory = renderer[node.type];
let generator;
if (factory) {
generator = factory.call(renderer, node);
let result = generator.next();
if (result.done) {
return result.value;
}
}
let fragment = node.children.map((childNode, idx) => {
if (childNode.type === 'text' && typeof childNode.text === 'string') {
return renderer.text(childNode.text);
}
else {
return render(renderer, childNode, idx);
}
}).join('');
if (generator) {
return generator.next(fragment).value;
}
else {
return fragment;
}
}
export default class CommonmarkRenderer {
export default class CommonmarkRenderer extends Renderer {
constructor() {
super();
this.state = {};

@@ -124,3 +71,7 @@ }

}
*'bold'(node) {
*'root'() {
let rawText = yield;
return rawText.join('');
}
*'bold'(_bold, context) {
let [before, text, after] = yield* split();

@@ -131,4 +82,3 @@ if (text.length === 0) {

else {
if (node.parent && !node.previous && !node.next &&
node.parent.type === 'italic') {
if (!context.previous && !context.next && context.parent instanceof Italic) {
return `${before}__${text}__${after}`;

@@ -141,3 +91,3 @@ }

let text = yield;
let lines = text.split('\n');
let lines = text.join('').split('\n');
let endOfQuote = lines.length;

@@ -155,14 +105,15 @@ let startOfQuote = 0;

}
*'heading'(node) {
let heading = yield;
let level = new Array(node.attributes.level + 1).join('#');
if (heading.indexOf('\n') !== -1) {
if (node.attributes.level === 1) {
return `${heading}\n====\n`;
*'heading'(heading) {
let rawText = yield;
let text = rawText.join('');
let level = new Array(heading.attributes.level + 1).join('#');
if (text.indexOf('\n') !== -1) {
if (heading.attributes.level === 1) {
return `${text}\n====\n`;
}
else if (node.attributes.level === 2) {
return `${heading}\n----\n`;
else if (heading.attributes.level === 2) {
return `${text}\n----\n`;
}
}
return `${level} ${heading}\n`;
return `${level} ${text}\n`;
}

@@ -172,10 +123,10 @@ *'horizontal-rule'() {

}
*'image'(node) {
if (node.attributes.title) {
let title = node.attributes.title.replace(/"/g, '\\"');
return `![${node.attributes.description}](${node.attributes.url} "${title}")`;
*'image'(image) {
if (image.attributes.title) {
let title = image.attributes.title.replace(/"/g, '\\"');
return `![${this.render(image.attributes.description)}](${image.attributes.url} "${title}")`;
}
return `![${node.attributes.description}](${node.attributes.url})`;
return `![${this.render(image.attributes.description)}](${image.attributes.url})`;
}
*'italic'(node) {
*'italic'(_italic, context) {
let state = Object.assign({}, this.state);

@@ -190,5 +141,5 @@ this.state.isItalicized = true;

let markup = state.isItalicized ? '_' : '*';
let hasWrappingBoldMarkup = node.parent && !node.previous && !node.next && node.parent.type === 'bold';
let hasAdjacentBoldMarkup = (node.next && node.next.type === 'bold' && after.length === 0) ||
(node.previous && node.previous.type === 'bold' && before.length === 0);
let hasWrappingBoldMarkup = !context.previous && !context.next && context.parent instanceof Bold;
let hasAdjacentBoldMarkup = (context.next instanceof Bold && after.length === 0) ||
(context.previous instanceof Bold && before.length === 0);
if (hasWrappingBoldMarkup || hasAdjacentBoldMarkup) {

@@ -203,7 +154,7 @@ markup = '_';

}
*'link'(node) {
*'link'(link) {
let [before, text, after] = yield* split();
let url = escapeAttribute(node.attributes.url);
if (node.attributes.title) {
let title = node.attributes.title.replace(/"/g, '\\"');
let url = escapeAttribute(link.attributes.url);
if (link.attributes.title) {
let title = link.attributes.title.replace(/"/g, '\\"');
return `${before}[${text}](${url} "${title}")${after}`;

@@ -213,43 +164,45 @@ }

}
*'code'(node) {
*'code'(code, context) {
let state = Object.assign({}, this.state);
Object.assign(this.state, { isPreformatted: true, htmlSafe: true });
let code = yield;
let rawText = yield;
let text = rawText.join('');
this.state = state;
if (node.attributes.style === 'fence') {
code = '\n' + code;
let info = node.attributes.info || '';
if (code.attributes.style === 'fence') {
text = '\n' + text;
let info = code.attributes.info || '';
let newlines = '\n';
if (this.state.isList && node.next) {
if (this.state.isList && context.next) {
newlines += '\n';
}
if (code.indexOf('```') !== -1) {
return `~~~${info}${code}~~~${newlines}`;
if (text.indexOf('```') !== -1) {
return `~~~${info}${text}~~~${newlines}`;
}
else {
return `\`\`\`${info}${code}\`\`\`${newlines}`;
return `\`\`\`${info}${text}\`\`\`${newlines}`;
}
}
else if (node.attributes.style === 'block') {
return code.split('\n').map((line) => ` ${line}`).join('\n') + '\n';
else if (code.attributes.style === 'block') {
return text.split('\n').map((line) => ` ${line}`).join('\n') + '\n';
}
else {
if (code.length === 0) {
if (text.length === 0) {
return '` `';
}
else {
let backticks = '`'.repeat(getNumberOfRequiredBackticks(code));
return `${backticks}${code}${backticks}`;
let backticks = '`'.repeat(getNumberOfRequiredBackticks(text));
return `${backticks}${text}${backticks}`;
}
}
}
*'html'(node) {
*'html'(html) {
let state = Object.assign({}, this.state);
Object.assign(this.state, { isPreformatted: true, htmlSafe: true });
let html = yield;
let rawText = yield;
let text = rawText.join('');
this.state = state;
if (node.attributes.type === 'block') {
return html + '\n';
if (html.attributes.style === 'block') {
return text + '\n';
}
return html;
return text;
}

@@ -265,3 +218,4 @@ *'list-item'() {

let indent = ' '.repeat(marker.length + 1);
let item = yield;
let text = yield;
let item = text.join('');
let firstCharacter = 0;

@@ -283,45 +237,43 @@ while (item[firstCharacter] === ' ')

}
*'list'(node) {
*'list'(list, context) {
let start = 1;
if (node.attributes.startsAt != null) {
start = node.attributes.startsAt;
if (list.attributes.startsAt != null) {
start = list.attributes.startsAt;
}
let delimiter = '';
if (node.attributes.type === 'numbered') {
if (list.attributes.type === 'numbered') {
delimiter = '.';
if (node.previous &&
node.previous.type === 'list' &&
node.previous.attributes.type === 'numbered' &&
node.previous.attributes.delimiter === '.') {
if (context.previous instanceof List &&
context.previous.attributes.type === 'numbered' &&
context.previous.attributes.delimiter === '.') {
delimiter = ')';
}
}
else if (node.attributes.type === 'bulleted') {
else if (list.attributes.type === 'bulleted') {
delimiter = '-';
if (node.previous &&
node.previous.type === 'list' &&
node.previous.attributes.type === 'bulleted' &&
node.previous.attributes.delimiter === '-') {
if (context.previous instanceof List &&
context.previous.attributes.type === 'bulleted' &&
context.previous.attributes.delimiter === '-') {
delimiter = '+';
}
}
node.attributes.delimiter = delimiter;
list.attributes.delimiter = delimiter;
let state = Object.assign({}, this.state);
let hasCodeBlockFollowing = node.next &&
node.next.type === 'code' &&
node.next.attributes.style === 'block';
let hasCodeBlockFollowing = context.next instanceof Code &&
context.next.attributes.style === 'block';
Object.assign(this.state, {
isList: true,
type: node.attributes.type,
type: list.attributes.type,
digit: start,
delimiter,
tight: node.attributes.tight,
tight: list.attributes.tight,
hasCodeBlockFollowing
});
let list = yield;
let text = yield;
this.state = state;
return list + '\n';
return text.join('') + '\n';
}
*'paragraph'() {
let text = yield;
let rawText = yield;
let text = rawText.join('');
if (!text.match(/^\s+$/g)) {

@@ -335,13 +287,3 @@ text = text.replace(/^\s+/g, '').replace(/\s+$/g, '');

}
render(document) {
let graph;
if (document instanceof HIR) {
graph = document;
}
else {
graph = new HIR(document);
}
return render(this, hirNodeToMarkdownNode(graph.rootNode, null), -1);
}
}
//# sourceMappingURL=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DLEtBQUssRUFBRTtZQUN4QixNQUFNLEVBQUUsSUFBSTtZQUNaLElBQUksRUFBRSxJQUFJLENBQUMsVUFBVSxDQUFDLElBQUk7WUFDMUIsS0FBSyxFQUFFLEtBQUs7WUFDWixTQUFTO1lBQ1QsS0FBSyxFQUFFLElBQUksQ0FBQyxVQUFVLENBQUMsS0FBSztZQUM1QixxQkFBcUI7U0FDdEIsQ0FBQyxDQUFDO1FBRUgsSUFBSSxJQUFJLEdBQUcsS0FBSyxDQUFDO1FBRWpCLElBQUksQ0FBQyxLQUFLLEdBQUcsS0FBSyxDQUFDO1FBQ25CLE9BQU8sSUFBSSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsR0FBRyxJQUFJLENBQUM7SUFDOUIsQ0FBQztJQUtELENBQUMsV0FBVztRQUNWLElBQUksT0FBTyxHQUFHLEtBQUssQ0FBQztRQUNwQixJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDO1FBTTVCLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLFFBQVEsQ0FBQyxFQUFFO1lBQ3pCLElBQUksR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLE9BQU8sRUFBRSxFQUFFLENBQUMsQ0FBQyxPQUFPLENBQUMsT0FBTyxFQUFFLEVBQUUsQ0FBQyxDQUFDO1NBQ3ZEO1FBRUQsSUFBSSxJQUFJLENBQUMsS0FBSyxDQUFDLEtBQUssRUFBRTtZQUNwQixPQUFPLElBQUksR0FBRyxJQUFJLENBQUM7U0FDcEI7UUFDRCxPQUFPLElBQUksR0FBRyxNQUFNLENBQUM7SUFDdkIsQ0FBQztDQUNGIn0=
{
"name": "@atjson/renderer-commonmark",
"version": "0.10.0",
"version": "0.11.0",
"description": "A brand new TypeScript library.",

@@ -19,10 +19,10 @@ "main": "dist/commonjs/index.js",

"devDependencies": {
"@atjson/schema": "0.9.0",
"@atjson/source-commonmark": "0.9.0"
"@atjson/source-commonmark": "0.11.0"
},
"dependencies": {
"@atjson/document": "0.9.0",
"@atjson/hir": "0.9.0"
"@atjson/document": "0.11.0",
"@atjson/offset-annotations": "0.11.0",
"@atjson/renderer-hir": "0.11.0"
},
"gitHead": "8d0640410453bbfc1495644c346145b502cc7400"
"gitHead": "36b48214b21591d09269f01d351d805a02447369"
}

@@ -1,6 +0,7 @@

import Document from '@atjson/document';
import { HIR, HIRNode } from '@atjson/hir';
import { Bold, Code, HTML, Heading, Image, Italic, Link, List } from '@atjson/offset-annotations';
import Renderer, { Context } from '@atjson/renderer-hir';
export function* split(): Iterable<any> {
let text = yield;
let rawText = yield;
let text = rawText.join('');
let start = 0;

@@ -28,4 +29,2 @@ let end = text.length;

export type CodeStyle = 'block' | 'inline' | 'fence';
// http://spec.commonmark.org/0.28/#backslash-escapes

@@ -67,79 +66,8 @@ function escapePunctuation(text: string) {

export interface Annotation {
type: string;
attributes: any;
previous: Annotation | null;
next: Annotation | null;
parent: Annotation | null;
text?: string;
children: Annotation[];
}
export default class CommonmarkRenderer extends Renderer {
function hirNodeToMarkdownNode(node: HIRNode, parent: Annotation | null): Annotation {
let markdownNode: Annotation = {
type: node.type,
attributes: node.attributes || {},
parent,
previous: null,
next: null,
text: node.text,
children: []
};
markdownNode.children.push(...node.children().map((childNode: HIRNode) => {
return hirNodeToMarkdownNode(childNode, markdownNode);
}));
return markdownNode;
}
function render(renderer: CommonmarkRenderer, node: Annotation, index: number): string {
if (node.parent && index > 0) {
node.previous = node.parent.children[index - 1];
}
if (node.parent && index < node.parent.children.length) {
node.next = node.parent.children[index + 1];
}
node.attributes = Object.keys(node.attributes).reduce((attrs: any, key: string) => {
let value = node.attributes[key];
if (value instanceof HIR) {
attrs[key] = render(renderer, hirNodeToMarkdownNode(value.rootNode, null), -1);
} else {
attrs[key] = value;
}
return attrs;
}, {});
let factory = (renderer as any)[node.type];
let generator;
if (factory) {
generator = factory.call(renderer, node);
let result = generator.next();
if (result.done) {
return result.value;
}
}
let fragment = node.children.map((childNode: Annotation, idx: number) => {
if (childNode.type === 'text' && typeof childNode.text === 'string') {
return renderer.text(childNode.text);
} else {
return render(renderer, childNode, idx);
}
}).join('');
if (generator) {
return generator.next(fragment).value;
} else {
return fragment;
}
}
export default class CommonmarkRenderer {
state: any;
constructor() {
super();
this.state = {};

@@ -155,2 +83,7 @@ }

*'root'() {
let rawText = yield;
return rawText.join('');
}
/**

@@ -162,3 +95,3 @@ * Bold text looks like **this** in Markdown.

*/
*'bold'(node: Annotation): Iterable<any> {
*'bold'(_bold: Bold, context: Context): Iterable<any> {
let [before, text, after] = yield* split();

@@ -168,4 +101,3 @@ if (text.length === 0) {

} else {
if (node.parent && !node.previous && !node.next &&
node.parent.type === 'italic') {
if (!context.previous && !context.next && context.parent instanceof Italic) {
return `${before}__${text}__${after}`;

@@ -185,3 +117,3 @@ }

let text = yield;
let lines: string[] = text.split('\n');
let lines: string[] = text.join('').split('\n');
let endOfQuote = lines.length;

@@ -210,15 +142,16 @@ let startOfQuote = 0;

*/
*'heading'(node: Annotation): Iterable<any> {
let heading = yield;
let level = new Array(node.attributes.level + 1).join('#');
*'heading'(heading: Heading): Iterable<any> {
let rawText = yield;
let text = rawText.join('');
let level = new Array(heading.attributes.level + 1).join('#');
// Multiline headings are supported for level 1 and 2
if (heading.indexOf('\n') !== -1) {
if (node.attributes.level === 1) {
return `${heading}\n====\n`;
} else if (node.attributes.level === 2) {
return `${heading}\n----\n`;
if (text.indexOf('\n') !== -1) {
if (heading.attributes.level === 1) {
return `${text}\n====\n`;
} else if (heading.attributes.level === 2) {
return `${text}\n----\n`;
}
}
return `${level} ${heading}\n`;
return `${level} ${text}\n`;
}

@@ -239,8 +172,8 @@

*/
*'image'(node: Annotation): Iterable<any> {
if (node.attributes.title) {
let title = node.attributes.title.replace(/"/g, '\\"');
return `![${node.attributes.description}](${node.attributes.url} "${title}")`;
*'image'(image: Image): Iterable<any> {
if (image.attributes.title) {
let title = image.attributes.title.replace(/"/g, '\\"');
return `![${this.render(image.attributes.description)}](${image.attributes.url} "${title}")`;
}
return `![${node.attributes.description}](${node.attributes.url})`;
return `![${this.render(image.attributes.description)}](${image.attributes.url})`;
}

@@ -251,3 +184,3 @@

*/
*'italic'(node: Annotation): Iterable<any> {
*'italic'(_italic: Italic, context: Context): Iterable<any> {
// This adds support for strong emphasis (per Commonmark)

@@ -265,5 +198,5 @@ // Strong emphasis includes _*two*_ emphasis markers around text.

let markup = state.isItalicized ? '_' : '*';
let hasWrappingBoldMarkup = node.parent && !node.previous && !node.next && node.parent.type === 'bold';
let hasAdjacentBoldMarkup = (node.next && node.next.type === 'bold' && after.length === 0) ||
(node.previous && node.previous.type === 'bold' && before.length === 0);
let hasWrappingBoldMarkup = !context.previous && !context.next && context.parent instanceof Bold;
let hasAdjacentBoldMarkup = (context.next instanceof Bold && after.length === 0) ||
(context.previous instanceof Bold && before.length === 0);
if (hasWrappingBoldMarkup || hasAdjacentBoldMarkup) {

@@ -287,7 +220,7 @@ markup = '_';

*/
*'link'(node: Annotation): Iterable<any> {
*'link'(link: Link): Iterable<any> {
let [before, text, after] = yield* split();
let url = escapeAttribute(node.attributes.url);
if (node.attributes.title) {
let title = node.attributes.title.replace(/"/g, '\\"');
let url = escapeAttribute(link.attributes.url);
if (link.attributes.title) {
let title = link.attributes.title.replace(/"/g, '\\"');
return `${before}[${text}](${url} "${title}")${after}`;

@@ -305,28 +238,29 @@ }

*/
*'code'(node: Annotation): Iterable<any> {
*'code'(code: Code, context: Context): Iterable<any> {
let state = Object.assign({}, this.state);
Object.assign(this.state, { isPreformatted: true, htmlSafe: true });
let code = yield;
let rawText = yield;
let text = rawText.join('');
this.state = state;
if (node.attributes.style === 'fence') {
code = '\n' + code;
let info = node.attributes.info || '';
if (code.attributes.style === 'fence') {
text = '\n' + text;
let info = code.attributes.info || '';
let newlines = '\n';
if (this.state.isList && node.next) {
if (this.state.isList && context.next) {
newlines += '\n';
}
if (code.indexOf('```') !== -1) {
return `~~~${info}${code}~~~${newlines}`;
if (text.indexOf('```') !== -1) {
return `~~~${info}${text}~~~${newlines}`;
} else {
return `\`\`\`${info}${code}\`\`\`${newlines}`;
return `\`\`\`${info}${text}\`\`\`${newlines}`;
}
} else if (node.attributes.style === 'block') {
return code.split('\n').map((line: string) => ` ${line}`).join('\n') + '\n';
} else if (code.attributes.style === 'block') {
return text.split('\n').map((line: string) => ` ${line}`).join('\n') + '\n';
} else {
// MarkdownIt strips all leading and trailing whitespace from code blocks,
// which means that we get an empty string for a single whitespace (` `).
if (code.length === 0) {
if (text.length === 0) {
return '` `';

@@ -337,4 +271,4 @@

} else {
let backticks = '`'.repeat(getNumberOfRequiredBackticks(code));
return `${backticks}${code}${backticks}`;
let backticks = '`'.repeat(getNumberOfRequiredBackticks(text));
return `${backticks}${text}${backticks}`;
}

@@ -344,14 +278,15 @@ }

*'html'(node: Annotation): Iterable<any> {
*'html'(html: HTML): Iterable<any> {
let state = Object.assign({}, this.state);
Object.assign(this.state, { isPreformatted: true, htmlSafe: true });
let html = yield;
let rawText = yield;
let text = rawText.join('');
this.state = state;
if (node.attributes.type === 'block') {
return html + '\n';
if (html.attributes.style === 'block') {
return text + '\n';
}
return html;
return text;
}

@@ -372,3 +307,4 @@

let indent = ' '.repeat(marker.length + 1);
let item: string = yield;
let text = yield;
let item = text.join('');
let firstCharacter = 0;

@@ -404,30 +340,29 @@ while (item[firstCharacter] === ' ') firstCharacter++;

*/
*'list'(node: Annotation): Iterable<any> {
*'list'(list: List, context: Context): Iterable<any> {
let start = 1;
if (node.attributes.startsAt != null) {
start = node.attributes.startsAt;
if (list.attributes.startsAt != null) {
start = list.attributes.startsAt;
}
let delimiter = '';
if (node.attributes.type === 'numbered') {
if (list.attributes.type === 'numbered') {
delimiter = '.';
if (node.previous &&
node.previous.type === 'list' &&
node.previous.attributes.type === 'numbered' &&
node.previous.attributes.delimiter === '.') {
if (context.previous instanceof List &&
context.previous.attributes.type === 'numbered' &&
context.previous.attributes.delimiter === '.') {
delimiter = ')';
}
} else if (node.attributes.type === 'bulleted') {
} else if (list.attributes.type === 'bulleted') {
delimiter = '-';
if (node.previous &&
node.previous.type === 'list' &&
node.previous.attributes.type === 'bulleted' &&
node.previous.attributes.delimiter === '-') {
if (context.previous instanceof List &&
context.previous.attributes.type === 'bulleted' &&
context.previous.attributes.delimiter === '-') {
delimiter = '+';
}
}
node.attributes.delimiter = delimiter;
list.attributes.delimiter = delimiter;

@@ -437,18 +372,17 @@ let state = Object.assign({}, this.state);

// Handle indendation for code blocks that immediately follow a list.
let hasCodeBlockFollowing = node.next &&
node.next.type === 'code' &&
node.next.attributes.style === 'block';
let hasCodeBlockFollowing = context.next instanceof Code &&
context.next.attributes.style === 'block';
Object.assign(this.state, {
isList: true,
type: node.attributes.type,
type: list.attributes.type,
digit: start,
delimiter,
tight: node.attributes.tight,
tight: list.attributes.tight,
hasCodeBlockFollowing
});
let list = yield;
let text = yield;
this.state = state;
return list + '\n';
return text.join('') + '\n';
}

@@ -460,3 +394,4 @@

*'paragraph'(): Iterable<any> {
let text = yield;
let rawText = yield;
let text = rawText.join('');

@@ -476,13 +411,2 @@ // Remove leading and trailing newlines from paragraphs

}
render(document: Document | HIR): string {
let graph;
if (document instanceof HIR) {
graph = document;
} else {
graph = new HIR(document);
}
return render(this, hirNodeToMarkdownNode(graph.rootNode, null), -1);
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc