marked-plaintify
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,8 @@ | ||
## marked-plaintify [1.1.1](https://github.com/bent10/marked-extensions/compare/marked-plaintify@1.1.0...marked-plaintify@1.1.1) (2024-08-29) | ||
### Bug Fixes | ||
* lint code ([c75dfc9](https://github.com/bent10/marked-extensions/commit/c75dfc94eb2fc61d258d2e36caf20d4a91e06a16)) | ||
# marked-plaintify [1.1.0](https://github.com/bent10/marked-extensions/compare/marked-plaintify@1.0.1...marked-plaintify@1.1.0) (2024-07-30) | ||
@@ -2,0 +9,0 @@ |
@@ -12,4 +12,4 @@ import { Renderer as x } from "marked"; | ||
let n = ""; | ||
for (let r = 0; r < e.items.length; r++) { | ||
const i = e.items[r], l = this.listitem(i); | ||
for (let i = 0; i < e.items.length; i++) { | ||
const r = e.items[i], l = this.listitem(r); | ||
typeof l == "string" && (n += l.replace(/\n{2,}/g, ` | ||
@@ -31,10 +31,10 @@ `)); | ||
f = []; | ||
for (let r = 0; r < e.header.length; r++) | ||
this.tablecell(e.header[r]); | ||
for (let i = 0; i < e.header.length; i++) | ||
this.tablecell(e.header[i]); | ||
let n = ""; | ||
for (let r = 0; r < e.rows.length; r++) { | ||
const i = e.rows[r]; | ||
for (let i = 0; i < e.rows.length; i++) { | ||
const r = e.rows[i]; | ||
let l = ""; | ||
for (let u = 0; u < i.length; u++) | ||
l += this.tablecell(i[u]); | ||
for (let u = 0; u < r.length; u++) | ||
l += this.tablecell(r[u]); | ||
n += this.tablerow({ text: l }); | ||
@@ -45,3 +45,3 @@ } | ||
const n = e.text.split("__CELL_PAD__").filter(Boolean); | ||
return f.map((r, i) => r + ": " + n[i]).join(` | ||
return f.map((i, r) => i + ": " + n[r]).join(` | ||
`) + ` | ||
@@ -72,3 +72,2 @@ | ||
}), { | ||
useNewRenderer: !0, | ||
renderer: { | ||
@@ -75,0 +74,0 @@ ...s, |
@@ -21,2 +21,2 @@ (function(r,c){typeof exports=="object"&&typeof module<"u"?module.exports=c(require("marked")):typeof define=="function"&&define.amd?define(["marked"],c):(r=typeof globalThis<"u"?globalThis:r||self,r.markedPlaintify=c(r.marked))})(this,function(r){"use strict";function c(f={}){const s={},u=["constructor","hr","checkbox","br","space"],m=["strong","em","del"],x=["html","code"];let o=[];return Object.getOwnPropertyNames(r.Renderer.prototype).forEach(t=>{u.includes(t)?s[t]=()=>"":m.includes(t)?s[t]=function(e){return this.parser.parseInline(e.tokens)}:x.includes(t)?s[t]=e=>h(e.text)+` | ||
`}:s[t]=function(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}}),{useNewRenderer:!0,renderer:{...s,...f}}}function h(f){const s={"&":"&","<":"<",">":">",'"':""","'":"'"};return f.replace(/[&<>"']/g,u=>s[u])}return c}); | ||
`}:s[t]=function(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}}),{renderer:{...s,...f}}}function h(f){const s={"&":"&","<":"<",">":">",'"':""","'":"'"};return f.replace(/[&<>"']/g,u=>s[u])}return c}); |
{ | ||
"name": "marked-plaintify", | ||
"description": "A marked extension to convert Markdown to Plaintext", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"publishConfig": { | ||
@@ -6,0 +6,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances 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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
14875
124