-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support different indentations and complex markup in docstrings…
… sections This commit changes how we parses the docstrings sections. Sections' items can be indented freely, and this base indent will be used to determine if the following lines are: - new items (base indent) - continuation lines (base indent * 2) - the end of the section (less than base indent) If a line is indented between base indent and base indent * 2, we still append it to the current item by removing its leading spaces, but we also append a parsing error telling the indentation is confusing. Thanks to @thebigmunch for the suggestion and help. This commit also changes how we build the sections' items values: instead of concatenating lines into one, we remove their base indent and join them on newlines, effectively allowing to use complex Markdown markup in the items descriptions. Fixes #17.
- Loading branch information
Showing
3 changed files
with
540 additions
and
426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.