markvincze / sabledocs

Simple static documentation generator for Protobuf and gRPC contracts.
MIT License
59 stars 14 forks source link

Support double space new line #56

Closed Niels-Be closed 6 months ago

Niels-Be commented 8 months ago

In Github or Gitlab Markdown a double space in the end of a line forces a line break. e.g. inserts a <br />.

This is helpful to force line breaks without adding an empty line between the comments.

Can this be added?

Maybe as a configurable markdown extension list in https://github.com/markvincze/sabledocs/blob/f6d2aca02535d31e20fab074bb874e5942d53d3b/src/sabledocs/proto_descriptor_parser.py#L420

I would also like to have nl2br and sane_lists See: https://python-markdown.github.io/extensions/#officially-supported-extensions

markvincze commented 8 months ago

Hi @Niels-Be,

@yinzara has implemented the capability to be able to specify further markdown extension, you see it at the bottom of the config example here: https://github.com/markvincze/sabledocs?tab=readme-ov-file#customization, it's available in the latest released version. With this feature you can enable the nl2br and sane_lists extensions. Can you give it a try if this works for you?

Niels-Be commented 7 months ago

hi, does not work yet as in sabledocs/src/sabledocs/proto_descriptor_parser.py the new config parameter is not used

markvincze commented 7 months ago

@Niels-Be Thanks for checking, indeed it was missed there, fix is here: https://github.com/markvincze/sabledocs/pull/63