Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
b6b9d465
Commit
b6b9d465
authored
Jan 16, 2015
by
Lars Magne Ingebrigtsen
Browse files
* lisp/dom.el (dom-strings): New function.
parent
22294ae5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
doc/lispref/text.texi
doc/lispref/text.texi
+3
-0
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/dom.el
lisp/dom.el
+8
-0
No files found.
doc/lispref/text.texi
View file @
b6b9d465
...
...
@@ -4507,6 +4507,9 @@ which is a regular expression.
Return all nodes in @var{dom} that have IDs that match @var{match},
which is a regular expression.
@item dom-strings @var{dom}
Return all strings in @var{DOM}.
@end table
Utility functions:
...
...
lisp/ChangeLog
View file @
b6b9d465
2015-01-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
* dom.el (dom-strings): New function.
* files.el (directory-files-recursively): Don't use the word
"path" for a file name.
...
...
lisp/dom.el
View file @
b6b9d465
...
...
@@ -103,6 +103,14 @@ A name is a symbol like `td'."
(
cons
dom
matches
)
matches
)))
(
defun
dom-strings
(
dom
)
"Return elements in DOM that are strings."
(
cl-loop
for
child
in
(
dom-children
dom
)
if
(
stringp
child
)
collect
child
else
append
(
dom-strings
child
)))
(
defun
dom-by-class
(
dom
match
)
"Return elements in DOM that have a class name that matches regexp MATCH."
(
dom-elements
dom
'class
match
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment