joplin-plugin-markdown-formatter 1.0.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
@@ -1,8 +1,14 @@
1
+ > [!NOTE]
2
+ > This plugin was created entirely with AI tools.
3
+
4
+ > [!NOTE]
5
+ > This plugin only works in the Markdown editor.
6
+
1
7
  # Markdown Formatter
2
8
 
3
- 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.
4
10
 
5
- The formatter is designed for note cleanup rather than wholesale rewriting: it parses Markdown to find
11
+ The plugin parses Markdown to find
6
12
  known structures, then applies targeted edits to the original text. Syntax it does not explicitly
7
13
  understand is left alone.
8
14
 
@@ -13,40 +19,47 @@ understand is left alone.
13
19
  - Normalize unordered list markers to `-` or `*`.
14
20
  - Renumber ordered lists sequentially while preserving the first item's number.
15
21
  - Normalize emphasis and bold delimiters.
16
- - Preserve, tighten (when list doesn't contain block content), or loosen list spacing.
22
+ - Normalize heading levels so they increase by at most one level at a time.
23
+ - Normalize list spacing: semantic (keep each list tight or loose as authored, fixing mixed spacing), preserve, tight, or loose.
17
24
  - Normalize nested list indentation with tabs, 2 spaces, or 4 spaces.
18
25
  - Normalize Horizontal rule format and spacing above/below.
19
26
  - Optionally align GitHub Flavored Markdown tables.
27
+ - Ensure headings have a blank line before and after neighboring content.
20
28
  - Collapse repeated blank lines outside protected content.
29
+ - Trim trailing whitespace outside protected content, preserving two-space hard line breaks.
21
30
  - Ensure the note ends with exactly one trailing newline.
22
31
  - Apply changes through CodeMirror so formatting is undoable with Joplin's normal undo command.
23
32
 
24
33
  ## Usage
25
34
 
26
- Install the plugin, open a Markdown note, then run:
35
+ Install the plugin, open a Markdown note, then:
27
36
 
28
37
  - `Edit -> Format Markdown`
29
38
  - `Ctrl+Alt+F` on Windows/Linux
30
39
  - `Cmd+Alt+F` on macOS
40
+ - Click `Format Markdown` button in the formatting toolbar
31
41
 
32
- The command formats the selected note body. If the note is already formatted, it does not write the note
42
+ The command formats the currently open note. If the note is already formatted, it does not write the note
33
43
  back.
34
44
 
35
45
  ## Settings
36
46
 
37
47
  Settings are available under `Markdown Formatter` in Joplin's plugin settings.
38
48
 
39
- | Setting | Default | Description |
40
- | -------------------------------- | ------------------- | ----------------------------------------------------------------------- |
41
- | Unordered list marker | `-` | Rewrite unordered bullets to dash or asterisk. |
42
- | Normalize ordered list numbering | On | Renumber ordered lists sequentially, keeping the first item number. |
43
- | Emphasis (italic) marker | `*emphasis*` | Prefer `*` or `_` for emphasis delimiters. |
44
- | Bold marker | `**bold**` | Prefer `**` or `__` for strong delimiters. |
45
- | List spacing | Preserve as written | Preserve, tighten, or loosen spacing between list items. |
46
- | List indentation | Tabs | Indentation used before nested list markers. |
47
- | Align table columns | Off | Pad table cells so pipes line up. |
48
- | Collapse consecutive blank lines | On | Reduce runs of blank lines to one blank line outside protected content. |
49
- | 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. |
50
63
 
51
64
  ## Safety Model
52
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joplin-plugin-markdown-formatter",
3
- "version": "1.0.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.0.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:f8488bb81828de4f3d33183208baf1b3e0c03e3326137d2b582633f6de3481e5",
33
- "_publish_commit": "main:5616e2ef5f0dee3562f19b010e56a82969fc393f"
32
+ "_publish_hash": "sha256:28a23e0147ba55860dc510adbb8878c1be86b3e86302473f206625d9989e4983",
33
+ "_publish_commit": "main:388205988f31f8226e7259b1cb4733a56fe0be7e"
34
34
  }