Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 0cb1ff6

Browse files
committed
Fix: Correct LP directive bugs.
1 parent 1033587 commit 0cb1ff6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

runestone/lp/lp.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class _LpBuildButtonDirective(RunestoneIdDirective):
195195
# No optional arguments.
196196
optional_arguments = 0
197197
# Per http://docutils.sourceforge.net/docs/howto/rst-directives.html, True if content is allowed. However, this isn't checked or enforced.
198-
has_content = True
198+
has_content = False
199199
# Options. Everything but language is currently ignored. This is based on activecode, so in the future similar support would be provided for these options.
200200
option_spec = RunestoneIdDirective.option_spec.copy()
201201
option_spec.update(
@@ -232,10 +232,6 @@ def run(self):
232232
lp_node["source"], lp_node["line"] = self.state_machine.get_source_and_line(
233233
self.lineno
234234
)
235-
# Insert the question number.
236-
self.content.append(self.options["qnumber"], "lp")
237-
# Parse it, since the number may be a role.
238-
self.state.nested_parse(self.content, self.content_offset, lp_node)
239235

240236
return [lp_node]
241237

0 commit comments

Comments
 (0)