diff options
Diffstat (limited to 'rtemsspec/content.py')
-rw-r--r-- | rtemsspec/content.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rtemsspec/content.py b/rtemsspec/content.py index 19f0bbbe..954d4599 100644 --- a/rtemsspec/content.py +++ b/rtemsspec/content.py @@ -732,8 +732,12 @@ class CContent(Content): def close_comment_block(self) -> None: """ Closes a comment block. """ self.pop_indent() - self.append(" */") - self.gap = True + if self._lines[-1].lstrip().startswith("/*"): + # Discard empty comment blocks + self._lines = self._lines[:-2] + else: + self.append(" */") + self.gap = True @contextmanager def doxygen_block(self) -> Iterator[None]: @@ -742,10 +746,6 @@ class CContent(Content): yield self.close_comment_block() - # Discard empty Doxygen blocks - if self._lines[-2] == "/**": - self._lines = self._lines[:-3] - @contextmanager def file_block(self) -> Iterator[None]: """ Opens a Doxygen @file comment block context. """ |