Fixes a bug causing multiline list items to be clipped#16
Conversation
|
I don't think this is supported by the markdown spec: https://www.markdownguide.org/basic-syntax/#lists-1 I'm not against adding it, but it should be done without regex |
|
Understood. I was confused about the spec myself, but LSPs seem to support multiline list items. What's the intention for this package? It has some extended markdown, so I guess not pure markdown? Or will this be a Tempest flavoured markdown? I personally don't mind if the output from multiline list items also span multiple lines, but I guess the author only intends to improve readability not introduce 'formatting'? Do you think the correct approach is to use the parser, something like this: $content = $parser->withRules(new ForceSingleLineRule())->lex($content . ' ' . $childContent)[0]->parse($parser);Or should I use an explode/implode combo? Just trying to get my head around the philosophy here. Other than this small issue, the package has worked flawlessly for my content. Thanks for your hard work on this! |
|
I'm fine adding support for it just built-in. I don't necessarily mind about not being 100% spec compliant, as long as most of the use cases work out of the box :) I didn't realize you're using |
Benchmark ResultsComparison of Open to see the benchmark resultsNo benchmark changes above ±5%. Generated by phpbench against commit 5ede707 |
|
The failing test had nothing to do with your PR, so thanks! |
When list item text is wrapped onto multiple lines, e.g.:
The list item is cut off resulting in output like this:
This PR fixes it.