Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for \parblock parsing and rendering #603

Merged
merged 2 commits into from
Dec 3, 2020

Conversation

utzig
Copy link
Contributor

@utzig utzig commented Dec 1, 2020

Add support for using the \parblock command from Doxygen: https://www.doxygen.nl/manual/commands.html#cmdparblock

This command can be used to generate multiple paragraphs from simple text inside the section. It's most useful for grouping text in Doxygen aliases.

Add support for using the \parblock command from Doxygen:
https://www.doxygen.nl/manual/commands.html#cmdparblock

This command can be used to generate multiple paragraphs from simple
text inside the section. It's most useful for grouping text in Doxygen
aliases.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
@vermeeren vermeeren linked an issue Dec 1, 2020 that may be closed by this pull request
@vermeeren vermeeren added code Source code enhancement Improvements, additions (also cosmetics) labels Dec 1, 2020
@utzig
Copy link
Contributor Author

utzig commented Dec 1, 2020

@vermeeren I hadn't even noticed someone already reported this! I just tried to create a Doxygen ALIAS today using \parblock and the rendering came back empty! :-)

@utzig
Copy link
Contributor Author

utzig commented Dec 1, 2020

@vermeeren I hadn't even noticed someone already reported this! I just tried to create a Doxygen ALIAS today using \parblock and the rendering came back empty! :-)

Also notice that the parsing of the contents of the <parblock> itself should be fine, but for my particular case the <parblock> was created inside a <para>, so I only updated the "para" parsing with it. This means this PR may not fix the issues mentioned because they mention \parblock inside \param. But it surely does make it much easier to fix those afterwards; I can take a look at this.

@utzig
Copy link
Contributor Author

utzig commented Dec 1, 2020

@vermeeren I hadn't even noticed someone already reported this! I just tried to create a Doxygen ALIAS today using \parblock and the rendering came back empty! :-)

Also notice that the parsing of the contents of the <parblock> itself should be fine, but for my particular case the <parblock> was created inside a <para>, so I only updated the "para" parsing with it. This means this PR may not fix the issues mentioned because they mention \parblock inside \param. But it surely does make it much easier to fix those afterwards; I can take a look at this.

@vermeeren Indeed using \parblock for documenting \param also creates a <para> around the <parblock> (inside the <paramterdescription> block) so this PR should fix #372 as well.

@vermeeren
Copy link
Collaborator

@utzig Thanks again for all your work. Should I take a look at reviewing this or is there something you'd like to check first?

@utzig
Copy link
Contributor Author

utzig commented Dec 1, 2020

@utzig Thanks again for all your work. Should I take a look at reviewing this or is there something you'd like to check first?

Yes, go ahead, I have no other updates as of yet, I was only in doubt about the usage with \param which seems to work fine, so this should be OK as is.

@vermeeren vermeeren self-requested a review December 3, 2020 23:10
@vermeeren vermeeren self-assigned this Dec 3, 2020
michaeljones pushed a commit that referenced this pull request Dec 3, 2020
@michaeljones michaeljones merged commit 089426b into breathe-doc:master Dec 3, 2020
@vermeeren
Copy link
Collaborator

@utzig All good, merged. Should I release a new version?

@utzig
Copy link
Contributor Author

utzig commented Dec 4, 2020

@utzig All good, merged. Should I release a new version?

Right now I don't need it, I used this to implement a PoC for something which we aren't sure yet when it will land. I'll ping you here if it turns into something we need.

In the meantime I was looking at a few issues for which I plan to submit patches for, so those may also be put all together in a new release.

Btw, maybe you should consider doing alphas, betas and so on. So instead of releasing a stable release every time, you just push a beta to pypi and a user can get with pip install --pre, but it is not installed when just using pip install -U. This allows for some test time (as long as there are people using it!), as well as avoids exhausting release numbers!

@vermeeren
Copy link
Collaborator

@utzig Sounds good to me, thanks!

I have been thinking about alpha/beta quite a while ago, but I find Breathe is mostly in maintenance mode right now with some smaller features sometimes added by contributors like you, so it's mainly fixes and compatibility updates with new Sphinx currently. Personally I don't think it's worth using alpha/beta for this type of development, though I will definitely reconsider if/when more major development is done. There are some vague plans for a Breathe 5 one day.

@utzig utzig deleted the parblock branch January 8, 2021 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Source code enhancement Improvements, additions (also cosmetics)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

\parblock is not supported
3 participants