Commit 0680554
authored
Simplify HTMLTree.build/1 by avoiding redundant build_tree calls (#683)
Text and comment nodes are leaf nodes and don't need the recursive
build_tree function. This change simplifies the code and provides
a small speedup during tree construction for these node types.1 parent 418250a commit 0680554
1 file changed
Lines changed: 2 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 77 | + | |
90 | 78 | | |
91 | 79 | | |
92 | 80 | | |
93 | 81 | | |
94 | 82 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 83 | + | |
108 | 84 | | |
109 | 85 | | |
110 | 86 | | |
| |||
0 commit comments