Skip to content

Commit cc45e39

Browse files
Apply suggestions from code review
Co-authored-by: Eric Holscher <[email protected]>
1 parent 23f9520 commit cc45e39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

readthedocs/embed/v3/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ def _parse_based_on_doctool(self, page_content, fragment, doctool, doctoolversio
141141
node = None
142142
if fragment:
143143
# NOTE: we use the `[id=]` selector because using `#{id}` requires
144-
# scaping the selector since CSS does not support the same
145-
# characters than the `id=` HTML attribute
144+
# escaping the selector since CSS does not support the same
145+
# characters as the `id=` HTML attribute
146146
# https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
147147
selector = f'[id="{fragment}"]'
148148
node = HTMLParser(page_content).css_first(selector)
@@ -187,7 +187,7 @@ def _parse_based_on_doctool(self, page_content, fragment, doctool, doctoolversio
187187
# Note that ``.iter()`` returns a generator and we modify
188188
# the HTML in-place, so we have to convert it to a list
189189
# before removing elements. Otherwise we break the
190-
# iteration before compliting it
190+
# iteration before completing it
191191
for n in list(parent_node.iter()): # pylint: disable=invalid-name
192192
if n not in (node, next_node):
193193
n.remove()

0 commit comments

Comments
 (0)