You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-16Lines changed: 27 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ A VSCode command called `Prettify markdown tables` is also available to format t
29
29
### Configurable settings:
30
30
- The maximum texth length of a selection/entire document to consider for formatting. Default: 1M chars (limit does not apply from CLI or NPM).
31
31
- Additional languages to support formatting for besides `markdown`. See possible configurable values [here](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers). Default: `[ ]`.
32
-
- Column spacing to make the columns more spaced out from each other. Default: `0` (no extra spacing).
32
+
- Column padding to make the columns more spaced out from each other. Default: `0` (no extra spacing/padding).
33
33
- Keyboard shortcut to prettify the currently opened markdown document. Default: <kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>M</kbd> (<kbd>CMD</kbd>+<kbd>ALT</kbd>+<kbd>M</kbd> on Mac).
@@ -61,26 +72,26 @@ The core formatting logic is available as a node docker image: `docker pull dark
61
72
62
73
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`).
| Prettify a file |`docker container run -i darkriszty/prettify-md < input.md`|`npm run --silent prettify-md < input.md`|
67
-
| 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`|
68
-
|* Check whether a file is prettyfied |`docker container run -i darkriszty/prettify-md --check < input.md`|`npm run --silent check-md < input.md`|
69
-
| Use `1`extra space between columns|`docker container run -i darkriszty/prettify-md --columnPadding=1 < input.md`|`npm run --silent prettify-md -- --columnPadding=1 < input.md`|
| Prettify a file |`docker container run -i darkriszty/prettify-md < input.md`|`npm run --silent prettify-md < input.md`|
78
+
| 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`|
79
+
| 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`|
80
+
| 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`|
70
81
71
-
> \* : the check will fail with an exception and return code `1` if the file is not prettyfied.
72
-
>
73
-
> Note: 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.
74
-
> Note: the `--` after the npm run script part is needed for npm to forward the arguments (for instance `--columnPadding=1`) to the actual script.
82
+
> Notes:
83
+
> * The prettify check (`--check` or `check-md`) will fail with an exception and return code `1` if the file is not prettyfied.
84
+
> * 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.
85
+
> * The `--` after the npm run script part is needed for npm to forward the arguments (for instance `--columnPadding=1`) to the actual prettyfier script.
86
+
> * Optionally, use `npx` to prettify files: `npx markdown-table-prettify < input.md` instead of `npm run --silent prettify-md < input.md`.
75
87
76
88
### Installation
77
89
78
-
To access the CLI, the extension can either be used from the Github sources, from the already instaledl VSCode extension or from NPM.
90
+
To access the CLI, the extension can either be used from the Github sources, from the already installed VSCode extension or from NPM.
79
91
80
92
#### Compiling from the source code
81
93
82
-
- Download the source code.
83
-
- Go to the extension directory.
94
+
- Clone or download the source code.
84
95
- Run `npm install`.
85
96
- Run `npm run compile`.
86
97
@@ -93,7 +104,7 @@ Locate the installed extension path. The typical location of the installed exten
93
104
94
105
#### Getting it from NPM
95
106
96
-
Install the NPM package `npm install -g markdown-table-prettify`. Optionally, use `npx` to prettify files: `npx markdown-table-prettify < input.md` (instead of `npm run --silent prettify-md < input.md`).
107
+
Install the NPM package `npm install -g markdown-table-prettify`.
0 commit comments