Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix initial case
  • Loading branch information
encukou committed Mar 5, 2025
commit c9581650256781e13ec3a54125352523916367ca
4 changes: 2 additions & 2 deletions Doc/tools/extensions/grammar_snippet.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ def make_grammar_snippet(
group_name = options['group']
node_location = self.get_location()
production_nodes = []
source_line = None
production_node = None
for source_line in content:
# Start a new production_node if there's text in the first
# column of the line. (That means a new rule is starting.)
if source_line is None or not source_line[:1].isspace():
if production_node is None or not source_line[:1].isspace():
production_node = addnodes.production(source_line)
Comment thread
AA-Turner marked this conversation as resolved.
Outdated
production_nodes.append(production_node)
else:
Expand Down