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

Commit 1730d2d

Browse files
authored
Merge pull request #1326 from bjones1/div-checker
Fix: Update tabbed routines to check for valid a divid.
2 parents 62f0e39 + 30ba737 commit 1730d2d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

runestone/tabbedStuff/tabbedStuff.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
from docutils import nodes
1919
from docutils.parsers.rst import directives
20+
21+
# We don't use a ``RunestoneIdNode``, because these imply a numbered question, not a GUI element. Likewise, only ``tabbed`` requires a divid; in addition, this divid doesn't need to be globally unique, since it won't be connected with a question in the database. Therefore, just use a RunestoneDirectory for these.
2022
from runestone.common.runestonedirective import RunestoneDirective, RunestoneNode
2123

2224

@@ -200,6 +202,7 @@ def run(self):
200202
self.assert_has_content()
201203

202204
self.options["divid"] = self.arguments[0]
205+
self.validate_divid(self.options["divid"])
203206

204207
env = self.state.document.settings.env
205208
self.options["divclass"] = env.config.tabbed_div_class

0 commit comments

Comments
 (0)