Skip to content

Commit 1d3005c

Browse files
committed
Fix create_tag
1 parent 8cbd35d commit 1d3005c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

selectolax/lexbor.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ class LexborHTMLParser:
12611261
12621262
Parameters
12631263
----------
1264-
tag_name : str
1264+
tag : str
12651265
Name of the tag to create.
12661266
12671267
Returns

selectolax/lexbor.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ cdef class LexborHTMLParser:
711711
712712
Parameters
713713
----------
714-
tag_name : str
714+
tag : str
715715
Name of the tag to create.
716716
717717
Returns
@@ -735,9 +735,9 @@ cdef class LexborHTMLParser:
735735
"""
736736
cdef lxb_html_element_t* element
737737
cdef lxb_dom_node_t* dom_node
738-
if not tag_name:
738+
if not tag:
739739
raise SelectolaxError("Tag name cannot be empty")
740-
pybyte_name = tag_name.encode('UTF-8')
740+
pybyte_name = tag.encode('UTF-8')
741741

742742
element = lxb_html_document_create_element(
743743
self.document,
@@ -747,7 +747,7 @@ cdef class LexborHTMLParser:
747747
)
748748

749749
if element == NULL:
750-
raise SelectolaxError(f"Can't create element for tag '{tag_name}'")
750+
raise SelectolaxError(f"Can't create element for tag '{tag}'")
751751

752752
dom_node = <lxb_dom_node_t *> element
753753

0 commit comments

Comments
 (0)