Skip to content

Commit e502609

Browse files
authored
Merge pull request #44 from darkriszty/bug/format-selection
Format selection improvements
2 parents e344c82 + 806dad3 commit e502609

13 files changed

Lines changed: 6144 additions & 1204 deletions

.github/workflows/test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Run tests
2+
3+
on:
4+
push:
5+
branches: [ master, feature/*, bug/* ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 15.x
19+
20+
- run: npm ci
21+
- run: npm test

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sudo: false
22

33
language: node_js
44
node_js:
5-
- "14"
5+
- "15"
66

77
os:
88
- linux

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
66

77
## [Unreleased]
88

9+
## 3.1.0 - 2020-11-04
10+
### Fixed
11+
- Issue #42: Don't alter selection for invalid range formatting attempt (does not impact CLI).
12+
- Issue #43: Handle `Format Selection` with multiple tables (does not impact CLI).
13+
914
## 3.0.0 - 2020-10-06
1015
### Added
1116
- Issue #32: Major refactoring to support CLI. Support `npm run prettify-md` and `npm run check-md`.

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ The extension has to be downloaded and compiled:
2626
- Run `npm run compile`.
2727

2828
The typical location of the installed extension (your actual version might differ):
29-
- Windows %USERPROFILE%\.vscode\extensions\darkriszty.markdown-table-prettify-3.0.0
30-
- macOS ~/.vscode/extensions/darkriszty.markdown-table-prettify-3.0.0
31-
- Linux ~/.vscode/extensions/darkriszty.markdown-table-prettify-3.0.0
29+
- Windows: `%USERPROFILE%\.vscode\extensions\darkriszty.markdown-table-prettify-3.0.0`
30+
- macOS: `~/.vscode/extensions/darkriszty.markdown-table-prettify-3.0.0`
31+
- Linux: `~/.vscode/extensions/darkriszty.markdown-table-prettify-3.0.0`
3232

3333
Available features from the command line:
3434
- To prettify a file: `npm run --silent prettify-md < input.md`.
@@ -39,15 +39,17 @@ Available features from the command line:
3939
4040
### Formatting with docker
4141

42+
The core formatting logic of the extension is also available as a node docker image: `docker pull darkriszty/prettify-md`.
43+
4244
Available features from docker:
4345
- To prettify a file: `docker container run -i darkriszty/prettify-md < input.md`.
4446
- To prettify a file and save the output: `docker container run -i darkriszty/prettify-md < input.md > output.md`.
4547
- To check whether a file is prettyfied or not: `docker container run -i darkriszty/prettify-md --check < input.md`. This will fail with an exception and return code `1` if the file is not prettyfied.
4648

4749
## Extension Settings
4850

49-
The extension is available for markdown language mode. It can either prettify a selected table (`Format Selection`) or the entire document (`Format Document`).
50-
A VSCode command called `Prettify markdown tables` is also available to format format the currently opened document.
51+
The extension is available for markdown language mode. It can either prettify a selection (`Format Selection`) or the entire document (`Format Document`).
52+
A VSCode command called `Prettify markdown tables` is also available to format the currently opened document.
5153

5254
Configurable settings:
5355
- The maximum texth length of a selection/entire document to consider for formatting. Defaults to 1M chars. There is no limit when running from the command line.

0 commit comments

Comments
 (0)