sphinx-contrib / matlabdomain

A Sphinx extension for documenting Matlab code
http://sphinxcontrib-matlabdomain.readthedocs.io/
Other
70 stars 45 forks source link

Added support for long property docstring in classes #127

Closed cvergari closed 2 years ago

cvergari commented 2 years ago

Description of changes

I have added support for multi-line comments that precede property declaration in classes. According to Matlab's documentation:

There are two ways to create help for properties:

  • Insert comment lines above the property definition. Use this approach for multiline help text.
  • Add a single-line comment next to the property definition.

I also added unit tests to probe the new feature.

Issues solved:

Fixes #125 Along the way, I think I also solved an issue where inline property docstrings were hidden if they were after a semicolon.

gyahalom commented 2 years ago

This is awesome! and thanks for also fixing the semicolon issue 😄

joeced commented 2 years ago

Awesome! Thanks for the contribution. I'll accept the PR now. Unfortunately, the CI testing on Travis is not working at the moment. There is 1 one failing test.

cvergari commented 2 years ago

That test failed on the master branch that I forked and I thought it was an old and know issue, since the comment in the class is "one day this will work" :). I am not sure what the "%:" directive is supposed to do, but I could take a shot at it!

joeced commented 2 years ago

No worries. I fixed the test and released version 0.13.0 with your contribution. I hadn't turned on github actions on pull request and Travis CI stopped working for me.