Skip to content

Commit 60da155

Browse files
JanWielemakerclaude
andcommitted
FIXED: Missing empty line after a bullet list in help/1 output
A list nested in the body of a definition list (`dd`) was formatted as a nested list, losing the empty lines that separate it from the surrounding text. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T13zyETRgTwZhjk383aj5n
1 parent 7ebf23a commit 60da155

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

library/lynx/html_text.pl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,21 @@
243243

244244
list_level_margins(State, 2-2) :-
245245
nonvar(State),
246-
State.get(list) == [],
246+
block_list_context(State.get(list)),
247247
!.
248248
list_level_margins(_, 0-0).
249249

250+
%! block_list_context(+OpenLists) is semidet.
251+
%
252+
% True when a list opened while OpenLists are open acts as a normal
253+
% block element and thus needs surrounding blank lines. This is the
254+
% case if the list is not nested in an item of an itemized list. As the
255+
% body of a `dd` element is a normal block context, a list inside a
256+
% definition list is a block element as well.
257+
258+
block_list_context([]).
259+
block_list_context([dl|_]).
260+
250261
format_list([], _, _, _).
251262
format_list([H|T], Type, Nth, State) :-
252263
format_list_element(H, Type, Nth, State),

0 commit comments

Comments
 (0)