We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 059f5c0 commit 2f56ebdCopy full SHA for 2f56ebd
internal/reader/sanitizer/sanitizer.go
@@ -452,16 +452,12 @@ func isPositiveInteger(value string) bool {
452
return false
453
}
454
455
-func getAttributeValue(name string, attributes []html.Attribute) string {
+func getIntegerAttributeValue(name string, attributes []html.Attribute) int {
456
for _, attribute := range attributes {
457
if attribute.Key == name {
458
- return attribute.Val
+ number, _ := strconv.Atoi(attribute.Val)
459
+ return number
460
461
- return ""
462
-}
463
-
464
-func getIntegerAttributeValue(name string, attributes []html.Attribute) int {
465
- number, _ := strconv.Atoi(getAttributeValue(name, attributes))
466
- return number
+ return 0
467
0 commit comments