Skip to content

Commit

Permalink
add collapse testcase to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesKaufmann committed Nov 4, 2024
1 parent 395858e commit 90318d6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 0 additions & 1 deletion cli/cmd/cmd_convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func (cli *CLI) convert(input []byte) ([]error, error) {

conv := converter.NewConverter(
converter.WithPlugins(
// TODO: there should be a golden file test for functionality that needs the base plugin
base.NewBasePlugin(),
commonmark.NewCommonmarkPlugin(
commonmark.WithStrongDelimiter(cli.config.strongDelimiter),
Expand Down
12 changes: 12 additions & 0 deletions cli/cmd/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,18 @@ func TestExecute(t *testing.T) {
inputArgs: []string{"html2markdown", `--opt-strong-delimiter`, `__`},
},
},
{
desc: "[convert] collapse",

input: CLIInput{
modeStdin: modePipe,
modeStdout: modePipe,
modeStderr: modePipe,

inputStdin: []byte("<p>Some <strong> bold </strong> text</p>"),
inputArgs: []string{"html2markdown"},
},
},

// - - - - - validation of options - - - - - //
{
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Some **bold** text

0 comments on commit 90318d6

Please sign in to comment.