
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
markdown-table-prettify
Advanced tools
Makes tables more readable for humans. Compatible with the Markdown writer plugin's table formatter feature in Atom.
code blocks` and ignore blocks with <!-- markdown-table-prettify-ignore-start --> and <!-- markdown-table-prettify-ignore-end -->.
The extension is available for markdown language mode. It can either prettify a selection (Format Selection) or the entire document (Format Document).
A VSCode command called Prettify markdown tables is also available to format the currently opened document.
markdown. See possible configurable values here. Default: [ ].0 (no extra spacing/padding).The core formatting logic is available as an NPM package: npm install --save markdown-table-prettify. The Typescript code is compiled down to ES5 and shipped inside the package.
It currently exposes the entry point also used by the CLI. It can be used from regular NodeJS or web apps:
import { CliPrettify } from 'markdown-table-prettify';
// or
const { CliPrettify } = require('markdown-table-prettify');
console.log(CliPrettify.prettify(
`hello|world
-|-
foo|bar`));
/* Output:
hello | world
------|------
foo | bar
*/
// specifying a column padding
console.log(CliPrettify.prettify(
`hello|world
-|-
foo|bar`, { columnPadding: 1 }));
/* Output:
hello | world
------ | ------
foo | bar
*/
The core formatting logic is available as a node docker image: docker pull darkriszty/prettify-md or as a stand alone CLI tool.
Formatting files or checking if they're already formatted is also possible from the command line without docker. This requires node and npm (optionally also npx).
| Feature | Docker | CLI |
|---|---|---|
| Prettify a file | docker container run -i darkriszty/prettify-md < input.md | npm run --silent prettify-md < input.md |
| Prettify a file and save the output | docker container run -i darkriszty/prettify-md < input.md > output.md | npm run --silent prettify-md < input.md > output.md |
| Check whether a file is pretty or not | docker container run -i darkriszty/prettify-md --check < input.md | npm run --silent check-md < input.md |
Use 1 as column padding | docker container run -i darkriszty/prettify-md --columnPadding=1 < input.md | npm run --silent prettify-md -- --columnPadding=1 < input.md |
Notes:
- The prettify check (
--checkorcheck-md) will fail with an exception and return code1if the file is not prettyfied.- The
--silentswitch sets the NPM log level to silent, which is useful to hide the executed file name and concentrate on the actual output.- The
--after the npm run script part is needed for npm to forward the arguments (for instance--columnPadding=1) to the actual prettyfier script.- Optionally, use
npxto prettify files:npx markdown-table-prettify < input.mdinstead ofnpm run --silent prettify-md < input.md.
To access the CLI, the extension can either be used from the Github sources, from the already installed VSCode extension or from NPM.
npm install.npm run compile.Locate the installed extension path. The typical location of the installed extension:
%USERPROFILE%\.vscode\extensions\darkriszty.markdown-table-prettify-{version}~/.vscode/extensions/darkriszty.markdown-table-prettify-{version}~/.vscode/extensions/darkriszty.markdown-table-prettify-{version}Install the NPM package npm install -g markdown-table-prettify.
FAQs
Transforms markdown tables to be more readable.
We found that markdown-table-prettify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.