hongdown 0.1.0-dev.7 → 0.1.0-dev.9

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.
Files changed (2) hide show
  1. package/README.md +58 -82
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -1,32 +1,45 @@
1
1
  Hongdown
2
2
  ========
3
3
 
4
- Hongdown is a Markdown formatter that enforces Hong Minhee's Markdown style
5
- conventions. The formatter is implemented in Rust using the [comrak] library
6
- for parsing. It produces consistently formatted Markdown output following
7
- a distinctive style used across multiple projects including [Fedify], [Hollo],
8
- and [Vertana].
9
-
10
- The name *Hongdown* is a portmanteau of *Hong* (from Hong Minhee, the author)
11
- and *Markdown*. It also sounds like the Korean word *hongdapda* (홍답다),
12
- meaning "befitting of Hong" or "Hong-like."
4
+ [![crates.io][crates.io badge]][crates.io]
5
+ [![npm][npm badge]][npm]
6
+ [![GitHub Actions][GitHub Actions badge]][GitHub Actions]
13
7
 
14
- [comrak]: https://docs.rs/comrak
15
- [Fedify]: https://github.com/dahlia/fedify
16
- [Hollo]: https://github.com/dahlia/hollo
17
- [Vertana]: https://github.com/dahlia/vertana
8
+ Hongdown is a Markdown formatter that enforces [Hong Minhee's Markdown style]
9
+ conventions. The formatter is implemented in Rust using the [Comrak] library
10
+ for parsing. It produces consistently formatted Markdown output following
11
+ a distinctive style used across multiple projects including [Fedify], [LogTape],
12
+ and [Optique].
13
+
14
+ [crates.io badge]: https://img.shields.io/crates/v/hongdown?logo=rust
15
+ [crates.io]: https://crates.io/crates/hongdown
16
+ [npm badge]: https://img.shields.io/npm/v/hongdown?logo=npm
17
+ [npm]: https://www.npmjs.com/package/hongdown
18
+ [GitHub Actions badge]: https://github.com/dahlia/hongdown/actions/workflows/main.yaml/badge.svg
19
+ [GitHub Actions]: https://github.com/dahlia/hongdown/actions/workflows/main.yaml
20
+ [Hong Minhee's Markdown style]: ./AGENTS.md#markdown-style-guide
21
+ [Comrak]: https://comrak.ee/
22
+ [Fedify]: https://fedify.dev/
23
+ [LogTape]: https://logtape.org/
24
+ [Optique]: https://optique.dev/
18
25
 
19
26
 
20
27
  Installation
21
28
  ------------
22
29
 
23
- ### npm (Node.js)
30
+ ### npm
24
31
 
25
32
  ~~~~ bash
26
33
  npm install -g hongdown
27
34
  ~~~~
28
35
 
29
- ### Cargo (Rust)
36
+ ### mise
37
+
38
+ ~~~~ bash
39
+ mise use github:dahlia/hongdown
40
+ ~~~~
41
+
42
+ ### Cargo
30
43
 
31
44
  ~~~~ bash
32
45
  cargo install hongdown
@@ -113,32 +126,37 @@ Hongdown looks for a `.hongdown.toml` file in the current directory and
113
126
  parent directories. You can also specify a configuration file explicitly
114
127
  with the `--config` option.
115
128
 
129
+ Below is an example configuration with all available options and their
130
+ default values:
131
+
116
132
  ~~~~ toml
117
133
  # File patterns (glob syntax)
118
- include = ["*.md", "docs/**/*.md"] # Files to format
119
- exclude = ["node_modules/**"] # Files to skip
134
+ include = [] # Files to format (default: none, specify on CLI)
135
+ exclude = [] # Files to skip (default: none)
120
136
 
121
137
  # Formatting options
122
- line_width = 80
138
+ line_width = 80 # Maximum line width (default: 80)
123
139
 
124
140
  [heading]
125
- setext_h1 = true # Use === underline for h1
126
- setext_h2 = true # Use --- underline for h2
141
+ setext_h1 = true # Use === underline for h1 (default: true)
142
+ setext_h2 = true # Use --- underline for h2 (default: true)
127
143
 
128
144
  [list]
129
- unordered_marker = "-" # "-", "*", or "+"
130
- leading_spaces = 1 # Spaces before marker
131
- trailing_spaces = 2 # Spaces after marker
132
- indent_width = 4 # Indentation for nested items
145
+ unordered_marker = "-" # "-", "*", or "+" (default: "-")
146
+ leading_spaces = 1 # Spaces before marker (default: 1)
147
+ trailing_spaces = 2 # Spaces after marker (default: 2)
148
+ indent_width = 4 # Indentation for nested items (default: 4)
133
149
 
134
150
  [ordered_list]
135
- odd_level_marker = "." # "1." at odd nesting levels
136
- even_level_marker = ")" # "1)" at even nesting levels
151
+ odd_level_marker = "." # "." or ")" at odd nesting levels (default: ".")
152
+ even_level_marker = ")" # "." or ")" at even nesting levels (default: ")")
153
+ pad = "start" # "start" or "end" for number alignment (default: "start")
154
+ indent_width = 4 # Indentation for nested items (default: 4)
137
155
 
138
156
  [code_block]
139
- fence_char = "~" # "~" or "`"
140
- min_fence_length = 4 # Minimum fence length
141
- space_after_fence = true # Space between fence and language
157
+ fence_char = "~" # "~" or "`" (default: "~")
158
+ min_fence_length = 4 # Minimum fence length (default: 4)
159
+ space_after_fence = true # Space between fence and language (default: true)
142
160
  ~~~~
143
161
 
144
162
  When `include` patterns are configured, you can run Hongdown without
@@ -192,7 +210,7 @@ Section
192
210
  ~~~~ markdown
193
211
  - First item
194
212
  - Second item
195
- - Nested item
213
+ - Nested item
196
214
  ~~~~
197
215
 
198
216
  ### Code blocks
@@ -231,9 +249,9 @@ See the [documentation] for more details.
231
249
  - Pipes are aligned accounting for East Asian wide characters
232
250
  - Minimum column width is maintained
233
251
 
234
- See [SPEC.md] for the complete style specification.
252
+ See the [*Markdown style guide*] for more detailed style conventions.
235
253
 
236
- [SPEC.md]: SPEC.md
254
+ [*Markdown style guide*]: ./AGENTS.md#markdown-style-guide
237
255
 
238
256
 
239
257
  Library usage
@@ -251,60 +269,18 @@ println!("{}", output);
251
269
  ~~~~
252
270
 
253
271
 
254
- TODO
255
- ----
256
-
257
- ### Phase 1: Core formatting
258
-
259
- - [x] Basic CLI with file input/output
260
- - [x] Front matter preservation (YAML/TOML)
261
- - [x] Headings (setext and ATX)
262
- - [x] Paragraphs with line wrapping
263
- - [x] Lists (ordered and unordered)
264
- - [x] Code blocks (fenced)
265
- - [x] Block quotes
266
- - [x] Inline formatting (emphasis, strong, code, links)
267
- - [x] Basic test suite
268
-
269
- ### Phase 2: Extended syntax
270
-
271
- - [x] Tables with alignment
272
- - [x] Definition lists
273
- - [x] GitHub alerts/admonitions
274
- - [x] Footnotes
275
- - [x] Reference link collection and placement
276
-
277
- ### Phase 3: Polish
278
-
279
- - [x] Configuration file support
280
- - [x] Config file parsing and discovery (`.hongdown.toml`)
281
- - [x] `line_width` option
282
- - [x] `[heading]` section
283
- - [x] `setext_h1` option
284
- - [x] `setext_h2` option
285
- - [x] `[list]` section
286
- - [x] `unordered_marker` option
287
- - [x] `leading_spaces` option
288
- - [x] `trailing_spaces` option
289
- - [x] `indent_width` option
290
- - [x] `[ordered_list]` section
291
- - [x] `odd_level_marker` option
292
- - [x] `even_level_marker` option
293
- - [x] `[code_block]` section
294
- - [x] `fence_char` option
295
- - [x] `min_fence_length` option
296
- - [x] `space_after_fence` option
297
- - [x] Check mode for CI integration
298
- - [x] Diff output mode
299
- - [x] Disable directives
300
- - [x] Edge case handling
301
- - [ ] Performance optimization
272
+ Etymology
273
+ ---------
274
+
275
+ The name *Hongdown* is a portmanteau of *Hong* (from Hong Minhee, the author)
276
+ and *Markdown*. It also sounds like the Korean word *hongdapda* (홍답다),
277
+ meaning “befitting of Hong” or “Hong-like.”
302
278
 
303
279
 
304
280
  License
305
281
  -------
306
282
 
307
- Distributed under the [GPL-3.0-or-later]. See [LICENSE] for more information.
283
+ Distributed under the [GPL-3.0-or-later]. See *[LICENSE]* for more information.
308
284
 
309
285
  [GPL-3.0-or-later]: https://www.gnu.org/licenses/gpl-3.0.html
310
- [LICENSE]: LICENSE
286
+ [LICENSE]: ./LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hongdown",
3
- "version": "0.1.0-dev.7+6178b8ad",
3
+ "version": "0.1.0-dev.9+629cb07a",
4
4
  "type": "module",
5
5
  "description": "A Markdown formatter that enforces Hong Minhee's Markdown style conventions",
6
6
  "license": "GPL-3.0-or-later",
@@ -27,11 +27,11 @@
27
27
  "node": ">=18"
28
28
  },
29
29
  "optionalDependencies": {
30
- "@hongdown/darwin-arm64": "0.1.0-dev.7+6178b8ad",
31
- "@hongdown/darwin-x64": "0.1.0-dev.7+6178b8ad",
32
- "@hongdown/linux-arm64": "0.1.0-dev.7+6178b8ad",
33
- "@hongdown/linux-x64": "0.1.0-dev.7+6178b8ad",
34
- "@hongdown/win32-arm64": "0.1.0-dev.7+6178b8ad",
35
- "@hongdown/win32-x64": "0.1.0-dev.7+6178b8ad"
30
+ "@hongdown/darwin-arm64": "0.1.0-dev.9+629cb07a",
31
+ "@hongdown/darwin-x64": "0.1.0-dev.9+629cb07a",
32
+ "@hongdown/linux-arm64": "0.1.0-dev.9+629cb07a",
33
+ "@hongdown/linux-x64": "0.1.0-dev.9+629cb07a",
34
+ "@hongdown/win32-arm64": "0.1.0-dev.9+629cb07a",
35
+ "@hongdown/win32-x64": "0.1.0-dev.9+629cb07a"
36
36
  }
37
37
  }