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
1e463294
Commit
1e463294
authored
Oct 04, 2010
by
Lars Magne Ingebrigtsen
Committed by
Katsumi Yamaoka
Oct 04, 2010
Browse files
shr.el (shr-insert): Tweak line breaking.
shr.el (shr-insert): Handle <pre> better.
parent
5d2ef6db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog
+2
-0
lisp/gnus/shr.el
lisp/gnus/shr.el
+11
-6
No files found.
lisp/gnus/ChangeLog
View file @
1e463294
2010-10-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
* shr.el (shr-ensure-paragraph): Fix the non-empty line case.
(shr-insert): Tweak line breaking.
(shr-insert): Handle <pre> better.
2010-10-04 Julien Danjou <julien@danjou.info>
...
...
lisp/gnus/shr.el
View file @
1e463294
...
...
@@ -214,14 +214,14 @@ fit these criteria."
image
)))
(
defun
shr-tag-pre
(
cont
)
(
let
((
shr-folding-mode
nil
))
(
let
((
shr-folding-mode
'none
))
(
shr-ensure-newline
)
(
shr-generic
cont
)
(
shr-ensure-newline
)))
(
defun
shr-tag-blockquote
(
cont
)
(
let
((
shr-indentation
(
+
shr-indentation
4
)))
(
shr-
tag-pre
cont
)))
(
shr-
generic
cont
)))
(
defun
shr-ensure-newline
()
(
unless
(
zerop
(
current-column
))
...
...
@@ -233,7 +233,7 @@ fit these criteria."
(
setq
shr-state
nil
))
(
cond
((
eq
shr-folding-mode
'none
)
(
insert
t
))
(
insert
tex
t
))
(
t
(
let
((
first
t
)
column
)
...
...
@@ -244,7 +244,9 @@ fit these criteria."
(
setq
column
(
current-column
))
(
when
(
>
column
0
)
(
cond
((
>
(
+
column
(
length
elem
)
1
)
shr-width
)
((
and
(
or
(
not
first
)
(
eq
shr-state
'space
))
(
>
(
+
column
(
length
elem
)
1
)
shr-width
))
(
insert
"\n"
))
((
not
first
)
(
insert
" "
))))
...
...
@@ -258,9 +260,11 @@ fit these criteria."
(
unless
shr-start
(
setq
shr-start
(
point
)))
(
insert
elem
))
(
setq
shr-state
nil
)
(
when
(
and
(
string-match
"[ \t\n]\\'"
text
)
(
not
(
bolp
)))
(
insert
" "
))))))
(
insert
" "
)
(
setq
shr-state
'space
))))))
(
defun
shr-get-image-data
(
url
)
"Get image data for URL.
...
...
@@ -293,7 +297,8 @@ Return a string with image data."
(
shr-generic
cont
))
(
defun
shr-tag-br
(
cont
)
(
shr-ensure-newline
)
(
unless
(
bobp
)
(
insert
"\n"
))
(
shr-generic
cont
))
(
defun
shr-tag-h1
(
cont
)
...
...
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