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
1c4b1e61
Commit
1c4b1e61
authored
Dec 17, 2013
by
Lars Magne Ingebrigtsen
Browse files
* net/shr.el (shr-tag-a): Support zero-length <a name="foo"> elements.
parent
11bade0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/net/eww.el
lisp/net/eww.el
+3
-3
lisp/net/shr.el
lisp/net/shr.el
+8
-0
No files found.
lisp/ChangeLog
View file @
1c4b1e61
2013-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/shr.el (shr-tag-a): Support zero-length <a name="foo"> elements.
* net/eww.el (eww-display-html): If we can't find the anchor we're
looking for, then go to point-min.
...
...
lisp/net/eww.el
View file @
1c4b1e61
...
...
@@ -269,11 +269,11 @@ word(s) will be searched for via `eww-search-prefix'."
(
point
(
goto-char
point
))
(
shr-target-id
(
goto-char
(
point-min
))
(
let
((
point
(
next-single-property-change
(
point-min
)
'shr-target-id
)))
(
goto-char
(
if
point
(
1+
point
)
(
point-min
)))))
(
when
point
(
goto-char
point
))))
(
t
(
goto-char
(
point-min
)))))
(
setq
eww-current-url
url
...
...
lisp/net/shr.el
View file @
1c4b1e61
...
...
@@ -1078,6 +1078,14 @@ ones, in case fg and bg are nil."
(
start
(
point
))
shr-start
)
(
shr-generic
cont
)
(
when
(
and
shr-target-id
(
equal
(
cdr
(
assq
:name
(
cdr
dom
)))
shr-target-id
))
;; We have a zero-length <a name="foo"> element, so just
;; insert... something.
(
when
(
=
start
(
point
))
(
shr-ensure-newline
)
(
insert
" "
))
(
put-text-property
start
(
1+
start
)
'shr-target-id
shr-target-id
))
(
when
(
and
url
(
not
shr-inhibit-decoration
))
(
shr-urlify
(
or
shr-start
start
)
(
shr-expand-url
url
)
title
))))
...
...
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