File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ def markdown(self, md: MetaMarkdown):
432432 )
433433
434434 if self .meta .summary is not None :
435- self .meta .summary = md .convert ("\n " .join (self .meta .summary ), context = self )
435+ self .meta .summary = md .convert (" " .join (self .meta .summary . split () ), context = self )
436436 elif paragraph := PARA_CAPTURE_RE .search (self .doc ):
437437 # If there is no stand-alone webpage for this item, e.g.
438438 # an internal routine, make the whole doc blob appear,
Original file line number Diff line number Diff line change @@ -2268,3 +2268,24 @@ def test_no_space_after_character_type(parse_fortran_file):
22682268 source = parse_fortran_file (data )
22692269 function = source .functions [0 ]
22702270 assert function .name .lower () == "firstword"
2271+
2272+
2273+ def test_summary_handling_bug703 (parse_fortran_file ):
2274+ """Check that `summary` works, PR #703"""
2275+ data = """\
2276+ !> summary: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
2277+ !> Fusce ultrices tortor et felis tempus vehicula.
2278+ !> Nulla gravida, magna ut pharetra.
2279+ !>
2280+ !> Full description
2281+ module test
2282+ end module myModule
2283+ """
2284+
2285+ fortran_file = parse_fortran_file (data )
2286+ md = MetaMarkdown ()
2287+
2288+ module = fortran_file .modules [0 ]
2289+ module .markdown (md )
2290+
2291+ assert "Lorem ipsum" in module .meta .summary
You can’t perform that action at this time.
0 commit comments