{"id":14982806,"url":"https://github.com/darkriszty/markdowntableprettify-vscodeext","last_synced_at":"2025-04-10T00:19:08.389Z","repository":{"id":19628669,"uuid":"83214331","full_name":"darkriszty/MarkdownTablePrettify-VSCodeExt","owner":"darkriszty","description":"Visual Studio Code extension to prettify markdown tables.","archived":false,"fork":false,"pushed_at":"2023-03-04T02:33:37.000Z","size":2024,"stargazers_count":58,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-29T02:10:13.585Z","etag":null,"topics":["markdown","markdown-table","visual-studio-code","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darkriszty.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-26T14:22:34.000Z","updated_at":"2024-06-18T18:30:05.743Z","dependencies_parsed_at":"2024-06-18T18:29:38.998Z","dependency_job_id":"67a2f4d9-78bb-4ef3-844a-861fcedcd772","html_url":"https://github.com/darkriszty/MarkdownTablePrettify-VSCodeExt","commit_stats":{"total_commits":269,"total_committers":5,"mean_commits":53.8,"dds":0.03345724907063197,"last_synced_commit":"3523a95fb07829b3a550b50e34c7c9c745b9ac29"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkriszty%2FMarkdownTablePrettify-VSCodeExt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkriszty%2FMarkdownTablePrettify-VSCodeExt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkriszty%2FMarkdownTablePrettify-VSCodeExt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkriszty%2FMarkdownTablePrettify-VSCodeExt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darkriszty","download_url":"https://codeload.github.com/darkriszty/MarkdownTablePrettify-VSCodeExt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131438,"owners_count":21052846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["markdown","markdown-table","visual-studio-code","vscode-extension"],"created_at":"2024-09-24T14:06:07.348Z","updated_at":"2025-04-10T00:19:08.363Z","avatar_url":"https://github.com/darkriszty.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Markdown table prettifier\n\n[![Test Status](https://github.com/darkriszty/MarkdownTablePrettify-VSCodeExt/workflows/Tests/badge.svg)](https://github.com/darkriszty/MarkdownTablePrettify-VSCodeExt/actions)\n[![Visual Studio Code extension](https://img.shields.io/visual-studio-marketplace/v/darkriszty.markdown-table-prettify?color=success\u0026label=VSCode)](https://marketplace.visualstudio.com/items?itemName=darkriszty.markdown-table-prettify)\n[![OVSX](https://img.shields.io/open-vsx/v/darkriszty/markdown-table-prettify?color=success\u0026label=Open%20VSX)](https://open-vsx.org/extension/darkriszty/markdown-table-prettify)\n[![Docker image](https://img.shields.io/docker/v/darkriszty/prettify-md?color=success\u0026label=Docker)](https://hub.docker.com/r/darkriszty/prettify-md/tags?page=1\u0026ordering=last_updated)\n[![NPM package](https://img.shields.io/npm/v/markdown-table-prettify?color=success)](https://www.npmjs.com/package/markdown-table-prettify)\n\nMakes tables more readable for humans. Compatible with the Markdown writer plugin's table formatter feature in Atom.\n\n## Feature highlights\n\n- Remove redundant ending table border if the beginning has no border, so the table _will not end_ with \"|\".\n- Create missing ending table border if the beginning already has a border, so the table _will end_ with \"|\".\n- Save space by not right-padding the last column if the table has no border.\n- Support empty columns inside tables.\n- Support column alignment options with \":\".\n- Find and format multiple tables.\n- Support \\``code blocks`\\` and ignore blocks with `\u003c!-- markdown-table-prettify-ignore-start --\u003e` and `\u003c!-- markdown-table-prettify-ignore-end --\u003e`.\n- Support indented tables.\n\n## Visual Studio Code\n\n![feature X](assets/animation.gif)\n\nThe extension is available for markdown language mode. It can either prettify a selection (`Format Selection`) or the entire document (`Format Document`).\nA VSCode command called `Prettify markdown tables` is also available to format the currently opened document. \n\n### Configurable settings:\n- The maximum texth length of a selection/entire document to consider for formatting. Default: 1M chars (limit does not apply from CLI or NPM).\n- Additional languages to support formatting for besides `markdown`. See possible configurable values [here](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers). Default: `[ ]`.\n- Column padding to make the columns more spaced out from each other. Default: `0` (no extra spacing/padding).\n- Keyboard shortcut to prettify the currently opened markdown document. Default: \u003ckbd\u003eCTRL\u003c/kbd\u003e+\u003ckbd\u003eALT\u003c/kbd\u003e+\u003ckbd\u003eM\u003c/kbd\u003e (\u003ckbd\u003eCMD\u003c/kbd\u003e+\u003ckbd\u003eALT\u003c/kbd\u003e+\u003ckbd\u003eM\u003c/kbd\u003e on Mac).\n\n## NPM\n\nThe 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.\n\nIt currently exposes the entry point also used by the _CLI_. It can be used from regular NodeJS or web apps:\n\n```JS\nimport { CliPrettify } from 'markdown-table-prettify';\n// or\nconst { CliPrettify } = require('markdown-table-prettify');\n\nconsole.log(CliPrettify.prettify(\n`hello|world\n-|-\nfoo|bar`));\n/* Output:\nhello | world\n------|------\nfoo   | bar\n*/\n\n// specifying a column padding\nconsole.log(CliPrettify.prettify(\n`hello|world\n-|-\nfoo|bar`, { columnPadding: 1 }));\n/* Output:\n hello  |  world\n ------ | ------\n foo    |  bar\n*/\n\n```\n\n## Docker \u0026 CLI\n\nThe core formatting logic is available as a node docker image: `docker pull darkriszty/prettify-md` or as a stand alone CLI tool.\n\nFormatting 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`).\n\n| Feature                               | Docker                                                                        | CLI                                                            |\n|---------------------------------------|-------------------------------------------------------------------------------|----------------------------------------------------------------|\n| Prettify a file                       | `docker container run -i darkriszty/prettify-md \u003c input.md`                   | `npm run --silent prettify-md \u003c input.md`                      |\n| Prettify a file and save the output   | `docker container run -i darkriszty/prettify-md \u003c input.md \u003e output.md`       | `npm run --silent prettify-md \u003c input.md \u003e output.md`          |\n| Check whether a file is pretty or not | `docker container run -i darkriszty/prettify-md --check \u003c input.md`           | `npm run --silent check-md \u003c input.md`                         |\n| Use `1` as column padding             | `docker container run -i darkriszty/prettify-md --columnPadding=1 \u003c input.md` | `npm run --silent prettify-md -- --columnPadding=1 \u003c input.md` |\n\n\u003e Notes:\n\u003e * The prettify check (`--check` or `check-md`) will fail with an exception and return code `1` if the file is not prettyfied.\n\u003e * The `--silent` switch sets the NPM log level to silent, which is useful to hide the executed file name and concentrate on the actual output.\n\u003e * The `--` after the npm run script part is needed for npm to forward the arguments (for instance `--columnPadding=1`) to the actual prettyfier script.\n\u003e * Optionally, use `npx` to prettify files: `npx markdown-table-prettify \u003c input.md` instead of `npm run --silent prettify-md \u003c input.md`.\n\n### Installation\n\nTo access the CLI, the extension can either be used from the Github sources, from the already installed VSCode extension or from NPM.\n\n#### Compiling from the source code\n\n- Clone or download the source code.\n- Run `npm install`.\n- Run `npm run compile`.\n\n#### Using the already installed VSCode extension\n\nLocate the installed extension path. The typical location of the installed extension:\n- Windows: `%USERPROFILE%\\.vscode\\extensions\\darkriszty.markdown-table-prettify-{version}`\n- macOS: `~/.vscode/extensions/darkriszty.markdown-table-prettify-{version}`\n- Linux: `~/.vscode/extensions/darkriszty.markdown-table-prettify-{version}`\n\n#### Getting it from NPM\n\nInstall the NPM package `npm install -g markdown-table-prettify`. \n\n## Known Issues\n\n- Tables with mixed character widths (eg: CJK) are not always properly formatted (issue #4).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkriszty%2Fmarkdowntableprettify-vscodeext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkriszty%2Fmarkdowntableprettify-vscodeext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkriszty%2Fmarkdowntableprettify-vscodeext/lists"}