WithListIndentStyle
option to control how blocks inside list items are indented.-list-indent-style
flag to control this option from the CLI.Published by abhinav almost 2 years ago
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 |
WithSoftWraps
to retain soft line breaks.WithCodeFormatters
to supply custom formatters for code blocks, and a GoCodeFormatter
built-in formatter.WithEmphasisToken
and WithStrongToken
to change the tokens used for bold and italic text.markdownfmt
CLI: Add -gofmt
flag to enable reformatting of Go source code.markdownfmt.NewParser
. If you need this, use markdownfmt.NewGoldmark
to get a goldmark.Markdown
and extract the parser from that.markdownfmt
CLI to cmd/markdownfmt.markdownfmt
package to module root.WithCodeFormatters
option to the Renderer
to enable reformatting of source code.markdownfmt
CLI: Don't shell out to diff
in -d
mode.markdownfmt
CLI: Don't reformat Go source code inside fenced code blocks. Opt into this functionality with the -gofmt
flag.Renderer.AddOptions
is no longer a no-op. It now extracts and applies Markdown-specific options from the provided list.Published by Kunde21 over 3 years ago
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!