joplin-plugin-markdown-formatter 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,9 +6,9 @@
6
6
 
7
7
  # Markdown Formatter
8
8
 
9
- A Joplin plugin that formats the current note's Markdown with configurable, conservative rules.
9
+ A Joplin plugin that formats the current note's Markdown with some configurable rules.
10
10
 
11
- The formatter is designed for note cleanup rather than wholesale rewriting: it parses Markdown to find
11
+ The plugin parses Markdown to find
12
12
  known structures, then applies targeted edits to the original text. Syntax it does not explicitly
13
13
  understand is left alone.
14
14
 
@@ -20,22 +20,24 @@ understand is left alone.
20
20
  - Renumber ordered lists sequentially while preserving the first item's number.
21
21
  - Normalize emphasis and bold delimiters.
22
22
  - Normalize heading levels so they increase by at most one level at a time.
23
- - Preserve, tighten (when list doesn't contain block content), or loosen list spacing.
23
+ - Normalize list spacing: semantic (keep each list tight or loose as authored, fixing mixed spacing), preserve, tight, or loose.
24
24
  - Normalize nested list indentation with tabs, 2 spaces, or 4 spaces.
25
25
  - Normalize Horizontal rule format and spacing above/below.
26
26
  - Optionally align GitHub Flavored Markdown tables.
27
27
  - Ensure headings have a blank line before and after neighboring content.
28
28
  - Collapse repeated blank lines outside protected content.
29
+ - Trim trailing whitespace outside protected content, preserving two-space hard line breaks.
29
30
  - Ensure the note ends with exactly one trailing newline.
30
31
  - Apply changes through CodeMirror so formatting is undoable with Joplin's normal undo command.
31
32
 
32
33
  ## Usage
33
34
 
34
- Install the plugin, open a Markdown note, then run:
35
+ Install the plugin, open a Markdown note, then:
35
36
 
36
37
  - `Edit -> Format Markdown`
37
38
  - `Ctrl+Alt+F` on Windows/Linux
38
39
  - `Cmd+Alt+F` on macOS
40
+ - Click `Format Markdown` button in the formatting toolbar
39
41
 
40
42
  The command formats the currently open note. If the note is already formatted, it does not write the note
41
43
  back.
@@ -44,19 +46,20 @@ back.
44
46
 
45
47
  Settings are available under `Markdown Formatter` in Joplin's plugin settings.
46
48
 
47
- | Setting | Default | Description |
48
- | -------------------------------- | ------------------- | ----------------------------------------------------------------------- |
49
- | Unordered list marker | `-` | Rewrite unordered bullets to dash or asterisk. |
50
- | Normalize ordered list numbering | On | Renumber ordered lists sequentially, keeping the first item number. |
51
- | Normalize heading level increments | On | Lower skipped heading levels so headings increase one level at a time. |
52
- | Emphasis (italic) marker | `*emphasis*` | Prefer `*` or `_` for emphasis delimiters. |
53
- | Bold marker | `**bold**` | Prefer `**` or `__` for strong delimiters. |
54
- | List spacing | Preserve as written | Preserve, tighten, or loosen spacing between list items. |
55
- | List indentation | Tabs | Indentation used before nested list markers. |
56
- | Align table columns | Off | Pad table cells so pipes line up. |
57
- | Ensure blank lines around headings | On | Add one blank line before and after headings with neighboring content. |
58
- | Collapse consecutive blank lines | On | Reduce runs of blank lines to one blank line outside protected content. |
59
- | Ensure trailing newline | On | End the note with exactly one newline. |
49
+ | Setting | Default | Description |
50
+ | ---------------------------------- | ------------------- | ----------------------------------------------------------------------- |
51
+ | Unordered list marker | `-` | Rewrite unordered bullets to dash or asterisk. |
52
+ | Normalize ordered list numbering | On | Renumber ordered lists sequentially, keeping the first item number. |
53
+ | Normalize heading level increments | On | Lower skipped heading levels so headings increase one level at a time. |
54
+ | Emphasis (italic) marker | `*emphasis*` | Prefer `*` or `_` for emphasis delimiters. |
55
+ | Bold marker | `**bold**` | Prefer `**` or `__` for strong delimiters. |
56
+ | List spacing | Semantic | Semantic keeps each list tight or loose as authored and only fixes mixed spacing, so rendering never changes. Preserve, tight, and loose are also available. |
57
+ | List indentation | Tabs | Indentation used before nested list markers. |
58
+ | Align table columns | Off | Pad table cells so pipes line up. |
59
+ | Ensure blank lines around headings | On | Add one blank line before and after headings with neighboring content. |
60
+ | Collapse consecutive blank lines | On | Reduce runs of blank lines to one blank line outside protected content. |
61
+ | Trim trailing whitespace | On | Remove trailing spaces and tabs outside protected content, preserving two-space hard line breaks. |
62
+ | Ensure trailing newline | On | End the note with exactly one newline. |
60
63
 
61
64
  ## Safety Model
62
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joplin-plugin-markdown-formatter",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "scripts": {
5
5
  "dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive",
6
6
  "prepare": "npm run dist",
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 1,
3
3
  "id": "com.bwat47.joplin-markdown-formatter",
4
4
  "app_min_version": "3.5",
5
- "version": "1.1.0",
5
+ "version": "1.2.0",
6
6
  "platforms": [
7
7
  "desktop",
8
8
  "mobile"
@@ -29,6 +29,6 @@
29
29
  "src": "images/markdown-formatter-promo.png",
30
30
  "label": "Markdown Formatter Promo Tile"
31
31
  },
32
- "_publish_hash": "sha256:dc50b70fcec22acb9114fbef93c491970838730fb887e34bded2d227f43f56e6",
33
- "_publish_commit": "main:7c2746ef5c9a396bb0b2b7af6258abafd85d8878"
32
+ "_publish_hash": "sha256:28a23e0147ba55860dc510adbb8878c1be86b3e86302473f206625d9989e4983",
33
+ "_publish_commit": "main:388205988f31f8226e7259b1cb4733a56fe0be7e"
34
34
  }