Comparing version 4.0.7 to 4.1.0
@@ -42,3 +42,3 @@ import chalk from 'chalk'; | ||
const codeLinesLength = `${codeValueLines.length}`.length; | ||
const pad = `${Array.from({ length: codeLinesLength }).join(' ')} `; | ||
const pad = `${Array.from({ length: codeLinesLength + 2 }).join(' ')}`; | ||
@@ -50,6 +50,6 @@ const codeContent = codeValueLines.map( | ||
pad, | ||
false, | ||
true, | ||
)( | ||
wrapAnsi(codeLine, context.lineWidth - pad.length - 1, { | ||
trim: false, | ||
wrapAnsi(codeLine, context.lineWidth - pad.length - 2, { | ||
trim: true, | ||
}), | ||
@@ -59,3 +59,3 @@ )}`, | ||
return indentify(' ', false)(codeContent.join('\n')); | ||
return indentify('', false)(codeContent.join('\n')); | ||
})(tag, context); | ||
@@ -62,0 +62,0 @@ |
import { blockTag } from '../tag-helpers/block-tag.js'; | ||
export const h1 = blockTag( | ||
(value, tag, context) => `${context.theme.h1("#")} ${value}`, | ||
(value, tag, context) => `${context.theme.h1('#')} ${value}`, | ||
{ | ||
marginTop: 2, | ||
marginBottom: 1, | ||
} | ||
}, | ||
); | ||
export const h2 = blockTag( | ||
(value, tag, context) => `${context.theme.h2("##")} ${value}`, | ||
(value, tag, context) => `${context.theme.h2('##')} ${value}`, | ||
{ | ||
marginTop: 1, | ||
marginBottom: 1, | ||
} | ||
}, | ||
); | ||
export const h3 = blockTag( | ||
(value, tag, context) => `${context.theme.h3("###")} ${value}`, | ||
(value, tag, context) => `${context.theme.h3('###')} ${value}`, | ||
{ | ||
marginTop: 1, | ||
marginBottom: 1, | ||
} | ||
}, | ||
); | ||
export const h4 = blockTag( | ||
(value, tag, context) => `${context.theme.h4("####")} ${value}`, | ||
(value, tag, context) => `${context.theme.h4('####')} ${value}`, | ||
{ | ||
marginTop: 1, | ||
marginBottom: 1, | ||
} | ||
}, | ||
); | ||
export const h5 = blockTag( | ||
(value, tag, context) => `${context.theme.h5("#####")} ${value}`, | ||
(value, tag, context) => `${context.theme.h5('#####')} ${value}`, | ||
{ | ||
marginTop: 1, | ||
marginBottom: 1, | ||
} | ||
}, | ||
); | ||
export const h6 = blockTag( | ||
(value, tag, context) => `${context.theme.h6("######")} ${value}`, | ||
(value, tag, context) => `${context.theme.h6('######')} ${value}`, | ||
{ | ||
marginTop: 1, | ||
marginBottom: 1, | ||
} | ||
}, | ||
); |
{ | ||
"name": "cli-html", | ||
"version": "4.0.7", | ||
"version": "4.1.0", | ||
"description": "Render HTML to Terminal", | ||
@@ -28,16 +28,13 @@ "main": "index.js", | ||
}, | ||
"engines": { | ||
"node": ">=18", | ||
"npm": ">=8" | ||
}, | ||
"engines": {}, | ||
"homepage": "https://github.com/horosgrisa/cli-html", | ||
"dependencies": { | ||
"ansi-align": "^3.0.1", | ||
"ansi-escapes": "^6.2.0", | ||
"ansi-escapes": "^7.0.0", | ||
"boxen": "^7.1.1", | ||
"chalk": "^5.3.0", | ||
"chalk-string": "^3.0.0", | ||
"change-case": "^5.4.2", | ||
"change-case": "^5.4.4", | ||
"cli-highlight": "^2.1.11", | ||
"cli-table3": "^0.6.3", | ||
"cli-table3": "^0.6.4", | ||
"color-namer": "^1.4.0", | ||
@@ -48,3 +45,3 @@ "compose-function": "^3.0.3", | ||
"he": "^1.2.0", | ||
"inline-style-parser": "^0.2.2", | ||
"inline-style-parser": "^0.2.3", | ||
"languages-aliases": "^3.0.0", | ||
@@ -59,20 +56,20 @@ "longest-line": "0.0.3", | ||
"wrap-ansi": "^9.0.0", | ||
"yaml": "^2.3.4" | ||
"yaml": "^2.4.2" | ||
}, | ||
"devDependencies": { | ||
"confusing-browser-globals": "^1.0.11", | ||
"eslint": "^8.56.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-standard-jsdoc": "^9.3.0", | ||
"eslint-plugin-async-await": "0.0.0", | ||
"eslint-plugin-jsdoc": "^48.0.2", | ||
"eslint-plugin-jsdoc": "^48.2.4", | ||
"eslint-plugin-json": "^3.1.0", | ||
"eslint-plugin-no-loops": "^0.3.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-perfectionist": "^2.5.0", | ||
"eslint-plugin-perfectionist": "^2.10.0", | ||
"eslint-plugin-prefer-object-spread": "^1.2.1", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"eslint-plugin-unicorn": "^50.0.1", | ||
"globals": "^13.24.0" | ||
"eslint-plugin-simple-import-sort": "^12.1.0", | ||
"eslint-plugin-unicorn": "^53.0.0", | ||
"globals": "^15.2.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
244824
+ Addedansi-escapes@7.0.0(transitive)
+ Addedenvironment@1.1.0(transitive)
- Removedansi-escapes@6.2.1(transitive)
Updatedansi-escapes@^7.0.0
Updatedchange-case@^5.4.4
Updatedcli-table3@^0.6.4
Updatedinline-style-parser@^0.2.3
Updatedyaml@^2.4.2