summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2020-04-02 18:42:41 -0400
committerAmin Bandali <bandali@gnu.org>2020-04-02 18:56:51 -0400
commit44ac9e48bbdb9e8546a7cb330ae8875cf093b505 (patch)
tree7569a234d9ce50cb369db8aa114abf8d56b0a448
parentb2f2d0d2c435e37a2823caef2090335bb7d27d5a (diff)
downloademacs-44ac9e48bbdb9e8546a7cb330ae8875cf093b505.tar.gz
Tweak htmlfontify's generated output
* lisp/htmlfontify.el (hfy-default-header): declare the character encoding for the generated HTML file. This helps browsers display UTF-8 characters like the copyright symbol correctly. (hfy-sprintf-stylesheet): apply the default style to all of the text consistently, so that unstyled bits (which are not wrapped in span tags and are directly part of the surrounding pre tag's "innerHTML") have a look consistent with the rest of the document.
-rw-r--r--lisp/htmlfontify.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index 152c70a64e2..c0012427ae1 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -628,6 +628,7 @@ STYLE is the inline CSS stylesheet (or tag referring to an external sheet)."
\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
+ <meta charset=\"utf-8\"/>
<title>%s</title>
%s
<script type=\"text/javascript\"><!--
@@ -1508,7 +1509,7 @@ Uses `hfy-link-style-fun' to do this."
"\n<style type=\"text/css\"><!-- \n"
;; Fix-me: Add handling of page breaks here + scan for ^L
;; where appropriate.
- (format "body %s\n" (cddr (assq 'default css)))
+ (format "body, pre %s\n" (cddr (assq 'default css)))
(apply 'concat
(mapcar
(lambda (style)