peschmae / glab-component-generator

Golang tool CLI tool to generate README.md from Gitlab Components
MIT License
2 stars 1 forks source link

Combine multiline string #1

Closed mschoettle closed 3 weeks ago

mschoettle commented 3 weeks ago

Very handy component, thanks a lot for this!

I have a multiline description which unfortunately does not get output properly for Markdown:

description: |
        Since currently components do neither give some meta information nor deliver additional files we need the information to do this manually.
        The version supplied must be a valid git branch/tag and match the version of the component.

Output:

| `component-version` | Since currently components do neither give some meta information nor deliver additional files we need the information to do this manually.
The version supplied must be a valid git branch/tag and match the version of the component.
 | _main_        |

One other things that I will squeeze in here: My repo also contains good old templates which get treated as components and produce a table with only the header. Is it possible to exclude those?

peschmae commented 3 weeks ago

Thanks :)

I've just released a new version 0.7.0 that includes support for multiline descriptions. As it's rendered to HTML in GitLab, it now replaces the linebreaks with a <br> tag.

Additionally I've also made sure that components that would only result in a header beeing printed, are skipped. This should also exclude the good old templates.