Releases: Kunde21/markdownfmt
Releases · Kunde21/markdownfmt
v3.1.0
v3.0.0
This is a new major release. You can install it using the module path: github.com/Kunde21/markdownfmt/v3.
Note that we moved some packages in this release. The import paths for different components are now:
| Component | Old import path | New import path |
|---|---|---|
| CLI | github.com/Kunde21/markdownfmt/v2 | github.com/Kunde21/markdownfmt/v3/cmd/markdownfmt |
| markdownfmt | github.com/Kunde21/markdownfmt/v2/markdownfmt | github.com/Kunde21/markdownfmt/v3 |
| markdown | github.com/Kunde21/markdownfmt/v2/markdown | github.com/Kunde21/markdownfmt/v3/markdown |
Added
- Support raw HTML blocks.
- Add
WithSoftWrapsto retain soft line breaks. - Add
WithCodeFormattersto supply custom formatters for code blocks, and aGoCodeFormatterbuilt-in formatter. - Add
WithEmphasisTokenandWithStrongTokento change the tokens used for bold and italic text. markdownfmtCLI: Add-gofmtflag to enable reformatting of Go source code.
Removed
- Deleted
markdownfmt.NewParser. If you need this, usemarkdownfmt.NewGoldmarkto get agoldmark.Markdownand extract the parser from that.
Changed
- Move
markdownfmtCLI to cmd/markdownfmt. - Move
markdownfmtpackage to module root. - Change module import path to github.com/Kunde21/markdownfmt/v3.
- Don't modify code inside fenced code by default. Supply the
WithCodeFormattersoption to theRendererto enable reformatting of source code. markdownfmtCLI: Don't shell out todiffin-dmode.markdownfmtCLI: Don't reformat Go source code inside fenced code blocks. Opt into this functionality with the-gofmtflag.Renderer.AddOptionsis no longer a no-op. It now extracts and applies Markdown-specific options from the provided list.
Fixed
- Fix formatting of whitespace in code blocks.
- Retain start positions for ordered lists.
- Significant performance improvements to rendering.
Happy 2021
Starting the new year with updated dependencies and some new supported elements.
TaskCheckBox and Autolink (Github Flavor) are now supported and formatted (#19)
Optional use of Hash headers is now available, default is underline (#26)
Attributes other than id are sorted and formatted, don't lose your classes anymore (#31)
Beyond that, there has been a major cleanup effort to simplify the code and reduce extra buffering.
Thank you to @bwplotka and @karelbilek for the contributions!
v0.1.2: fix markdownfmt adds trailing blank lines to document (#1)
* fix markdownfmt adds trailing blank lines to document * fix markdownfmt adds trailing blank lines to document