Skip to content

Commit 6efaf2c

Browse files
committed
0.3.7 Update
Better support for bullet points in comments
1 parent b189a6e commit 6efaf2c

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = 'sphinxfortran_ng'
3-
version = '0.3.6'
3+
version = '0.3.7'
44
authors = [{name = "Lorenzo Crippa", email="[email protected]"}]
55
description = "An improved version of the sphinx-fortran python module"
66
readme = "README.md"

src/sphinxfortran_ng/fortran_autodoc.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,12 @@ def scan(self):
359359
nameold = None
360360
else:
361361
if nameold is not None:
362-
block['vars'][nameold]['desc'] +=line.lstrip()[1:]
362+
thestring = line.lstrip()[1:]
363+
if thestring.lstrip().startswith('*'):
364+
block['vars'][nameold]['desc'] += "\n\n"
365+
block['vars'][nameold]['desc'] += thestring
366+
if thestring.lstrip().startswith('*'):
367+
block['vars'][nameold]['desc'] += "\n\n"
363368
continue
364369
else:
365370
continue
@@ -457,7 +462,12 @@ def scan_container(self, block, insrc=None):
457462
nameold = None
458463
else:
459464
if nameold is not None:
460-
block['vars'][nameold]['desc'] +=line.lstrip()[1:]
465+
thestring = line.lstrip()[1:]
466+
if thestring.lstrip().startswith('*'):
467+
block['vars'][nameold]['desc'] += "\n\n"
468+
block['vars'][nameold]['desc'] += thestring
469+
if thestring.lstrip().startswith('*'):
470+
block['vars'][nameold]['desc'] += "\n\n"
461471
continue
462472
else:
463473
continue
@@ -479,7 +489,12 @@ def scan_container(self, block, insrc=None):
479489
nameold = None
480490
else:
481491
if nameold is not None:
482-
block['vars'][nameold]['desc'] +=line.lstrip()[1:]
492+
thestring = line.lstrip()[1:]
493+
if thestring.lstrip().startswith('*'):
494+
block['vars'][nameold]['desc'] += "\n\n"
495+
block['vars'][nameold]['desc'] += thestring
496+
if thestring.lstrip().startswith('*'):
497+
block['vars'][nameold]['desc'] += "\n\n"
483498
continue
484499
else:
485500
continue

0 commit comments

Comments
 (0)