Skip to content

Commit e2e133b

Browse files
committed
chore: remove unused node
1 parent b2451d1 commit e2e133b

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

ast/ast.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const (
1111
HorizontalRuleNode NodeType = "HORIZONTAL_RULE"
1212
BlockquoteNode NodeType = "BLOCKQUOTE"
1313
ListNode NodeType = "LIST"
14-
ListItemNode NodeType = "LIST_ITEM"
1514
OrderedListItemNode NodeType = "ORDERED_LIST_ITEM"
1615
UnorderedListItemNode NodeType = "UNORDERED_LIST_ITEM"
1716
TaskListItemNode NodeType = "TASK_LIST_ITEM"
@@ -55,7 +54,7 @@ type BaseNode struct {
5554

5655
func IsBlockNode(node Node) bool {
5756
switch node.Type() {
58-
case ParagraphNode, CodeBlockNode, HeadingNode, HorizontalRuleNode, BlockquoteNode, ListNode, ListItemNode, OrderedListItemNode, UnorderedListItemNode, TaskListItemNode, TableNode, EmbeddedContentNode:
57+
case ParagraphNode, CodeBlockNode, HeadingNode, HorizontalRuleNode, BlockquoteNode, ListNode, OrderedListItemNode, UnorderedListItemNode, TaskListItemNode, TableNode, EmbeddedContentNode:
5958
return true
6059
default:
6160
return false

ast/block.go

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,8 @@ func (n *List) Restore() string {
131131
return result
132132
}
133133

134-
type ListItem struct {
135-
BaseBlock
136-
}
137-
138-
func (*ListItem) Type() NodeType {
139-
return ListItemNode
140-
}
141-
142-
func (*ListItem) Restore() string {
143-
// Should be overridden.
144-
return ""
145-
}
146-
147134
type OrderedListItem struct {
148-
ListItem
135+
BaseBlock
149136

150137
// Number is the number of the list.
151138
Number string
@@ -167,7 +154,7 @@ func (n *OrderedListItem) Restore() string {
167154
}
168155

169156
type UnorderedListItem struct {
170-
ListItem
157+
BaseBlock
171158

172159
// Symbol is "*" or "-" or "+".
173160
Symbol string
@@ -189,7 +176,7 @@ func (n *UnorderedListItem) Restore() string {
189176
}
190177

191178
type TaskListItem struct {
192-
ListItem
179+
BaseBlock
193180

194181
// Symbol is "*" or "-" or "+".
195182
Symbol string

0 commit comments

Comments
 (0)