JuliaInterop / Clang.jl

C binding generator and Julia interface to libclang
https://juliainterop.github.io/Clang.jl/
MIT License
225 stars 68 forks source link

strip trailing whitespace in generated docstrings #366

Closed visr closed 2 years ago

visr commented 2 years ago

And also remove remove empty lines in Parameters or Returns lists. Though it could be that I don't understand the reason those need to be there. The markdown format doesn't require them.

melonedo commented 2 years ago

From Julia manual on markdown lists, the empty line is required for complex markdown elements. For example a nested list in parameter.

## Parameters
- `arg`: This arguments takes various forms:
    - form1
    - form2
- `arg2`: code block

    ```c
    int foo(void);

My experiments showed no difference though.
Gnimuc commented 2 years ago

That doc is probably outdated. This change might be related.

melonedo commented 2 years ago

So we can omit the empty line as long as we do not find broken format. I could not reproduce what formatting issue might be triggered by omitting that.