Skip to content

Commit 982a3fe

Browse files
committed
Fix missing options
1 parent 30d3366 commit 982a3fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

snooty/parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,6 @@ def handle_directive(self, node: docutils.nodes.Node, doc: Dict[str, Serializabl
131131
doc['name'] = name
132132

133133
options = node['options'] or {}
134-
if options:
135-
doc['options'] = options
136-
137134
if node.children and node.children[0].__class__.__name__ == 'directive_argument':
138135
visitor = self.__make_child_visitor()
139136
node.children[0].walkabout(visitor)
@@ -165,6 +162,9 @@ def handle_directive(self, node: docutils.nodes.Node, doc: Dict[str, Serializabl
165162
argument_text, os.strerror(err.errno))
166163
self.diagnostics.append(Diagnostic.error(msg, util.get_line(node)))
167164

165+
if options:
166+
doc['options'] = options
167+
168168
def add_static_asset(self, path: Path) -> StaticAsset:
169169
fileid, path = util.reroot_path(path, self.docpath, self.project_root)
170170
static_asset = StaticAsset.load(fileid.as_posix(), path)

0 commit comments

Comments
 (0)