@atjson/renderer-commonmark
Advanced tools
Comparing version 0.6.1 to 0.6.2
{ | ||
"name": "@atjson/renderer-commonmark", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "A brand new TypeScript library.", | ||
@@ -5,0 +5,0 @@ "main": "dist/commonjs/index.js", |
@@ -49,9 +49,12 @@ import { HIRNode } from '@atjson/hir'; | ||
let lines: string[] = text.join('').split('\n'); | ||
let endOfQuote: number = lines.length; | ||
let endOfQuote = lines.length; | ||
let startOfQuote = 0; | ||
while (lines[endOfQuote - 1] === '') { | ||
endOfQuote--; | ||
} | ||
while (lines[startOfQuote].match(/^(\s)*$/)) startOfQuote++; | ||
while (lines[endOfQuote - 1].match(/^(\s)*$/)) endOfQuote--; | ||
return lines.slice(0, endOfQuote).map(line => `> ${line}`).concat(lines.slice(endOfQuote)).join('\n'); | ||
return [ | ||
...lines.slice(startOfQuote, endOfQuote).map(line => `> ${line}`), | ||
'\n' | ||
].join('\n'); | ||
}, | ||
@@ -107,4 +110,4 @@ | ||
*'link'(props: { href: string }): IterableIterator<string> { | ||
let text = yield; | ||
return `[${text.join('')}](${props.href})`; | ||
let [before, text, after] = yield* split(); | ||
return `${before}[${text}](${props.href})${after}`; | ||
}, | ||
@@ -111,0 +114,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
496
29188
7