Skip to content

Commit

Permalink
Merge pull request #8 from CESNET/kriz_fix_disappearing_groups
Browse files Browse the repository at this point in the history
[BUGFIX]: Fix disappearing of group descriptions.
  • Loading branch information
xkrizd01 authored Oct 25, 2022
2 parents 9a55e7e + a9302a0 commit 0e7b63c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/source/autodoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ For the automatic extraction to work, the code must be particularly formatted. S
- every group must start and end with line containing the ``==`` pattern, followed
by the name of the group and the group's description
- underneath, the list of ports or generics should follow
- there cannot be more than one group with the same name in one entity

Example
-------
Expand Down
2 changes: 1 addition & 1 deletion src/sphinxvhdl/autodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def init(path: str) -> None:
elif state == ParseState.GROUPS and current_group != '' and '====' not in line:
current_doc.append(line[3:])
elif state == ParseState.GROUPS and '====' not in line:
current_group = line[3:].strip()
current_group = current_entity + " " + line[3:].strip()
current_doc = []
elif state == ParseState.GROUPS and '====' in line:
group_definition = current_doc
Expand Down
2 changes: 1 addition & 1 deletion src/sphinxvhdl/vhdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def run(self):
# Create nodes that contains name and description of group
group_name = nodes.entry('')
group_desc = nodes.entry('')
self.state.nested_parse(StringList(initlist=[fields[0]]), 0, group_name)
self.state.nested_parse(StringList(initlist=[fields[0].split(' ', 1)[1]]), 0, group_name)
self.state.nested_parse(StringList(autodoc.groups_desc[current_group]), 0, group_desc)

# Create row that contains information about group (name, description and separators)
Expand Down

0 comments on commit 0e7b63c

Please sign in to comment.