diff options
author | Vasilij Schneidermann <mail@vasilij.de> | 2020-05-03 16:42:56 +0200 |
---|---|---|
committer | Vasilij Schneidermann <mail@vasilij.de> | 2020-05-03 16:42:56 +0200 |
commit | 7047aae31c9dd17dc6378d895379cb49c6a218dc (patch) | |
tree | e0fdad0b34a3177e6deefe5a23e5c01904362e20 | |
parent | ea0c835c1b5e6e70293f4bd64e9c89bdc42f8596 (diff) |
Remove unused depth argument
-rw-r--r-- | nov.el | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -347,14 +347,14 @@ Each alist item consists of the identifier and full path." (nov--content-epub2-files content manifest files) (nov--content-epub3-files content manifest files)))) -(defun nov--walk-ncx-node (node depth) +(defun nov--walk-ncx-node (node) (let ((tag (esxml-node-tag node)) (children (--filter (eq (esxml-node-tag it) 'navPoint) (esxml-node-children node)))) (cond ((eq tag 'navMap) (insert "<ol>\n") - (mapc (lambda (node) (nov--walk-ncx-node node (1+ depth))) children) + (mapc (lambda (node) (nov--walk-ncx-node node)) children) (insert "</ol>\n")) ((eq tag 'navPoint) (let* ((label-node (esxml-query "navLabel>text" node)) @@ -367,7 +367,7 @@ Each alist item consists of the identifier and full path." (if children (progn (insert (format "<li>\n%s\n<ol>\n" link)) - (mapc (lambda (node) (nov--walk-ncx-node node (1+ depth))) + (mapc (lambda (node) (nov--walk-ncx-node node)) children) (insert (format "</ol>\n</li>\n"))) (insert (format "<li>\n%s\n</li>\n" link))))))))) @@ -376,7 +376,7 @@ Each alist item consists of the identifier and full path." "Convert NCX document at PATH to HTML." (let ((root (esxml-query "navMap" (nov-slurp path t)))) (with-temp-buffer - (nov--walk-ncx-node root 0) + (nov--walk-ncx-node root) (buffer-string)))) |