I've got a toy paper I'm writing where I ran into a couple of issues
exporting to html.  The first issue is related to exporting the source of a
css block that contains proprietary properties.  In short, it looks like a
list is generated for the font face, where a single value was expected.

The second issue may be my fault, so if there is a setting I should change
on my end, apologies and I'll set said setting.  Basically, there is a
cutoff value whereby node.js will insert newlines into the results.  This
was incredibly frustrating as what was turning into a decent looking table
would suddenly become garbage.

In both cases, I did not add a test file.  If it is enough to just copy an
existing test file and trim it down to just these two items, I can
certainly do that.

Finally, apologies if I am doing this incorrectly.  I tried following the
directions on how to contribute as well as I could.

Thanks!

-josh
From 0441982a9457f9bbd953a06ab4fa830c6ffc967b Mon Sep 17 00:00:00 2001
From: Josh Berry <tae...@gmail.com>
Date: Mon, 4 Aug 2014 22:45:43 -0400
Subject: [PATCH 1/2] Fix css export when proprietary properties are used

* htmlize.el (htmlize-face-size): Check for a list instead of a single
  font face.

`face-attribute' does not act kindly to being given a list of faces.

TINYCHANGE
---
 contrib/lisp/htmlize.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/lisp/htmlize.el b/contrib/lisp/htmlize.el
index 3bf5949..6654f40 100644
--- a/contrib/lisp/htmlize.el
+++ b/contrib/lisp/htmlize.el
@@ -1079,7 +1079,7 @@ If no rgb.txt file is found, return nil."
   (let ((size-list
 	 (loop
 	  for f = face then (face-attribute f :inherit)
-	  until (or (not f) (eq f 'unspecified))
+	  until (or (not f) (eq f 'unspecified) (listp f))
 	  for h = (face-attribute f :height)
 	  collect (if (eq h 'unspecified) nil h))))
     (reduce 'htmlize-merge-size (cons nil size-list))))
-- 
1.9.1

From 792b89a0922ee21bd0155f68adb0ce07c2558a51 Mon Sep 17 00:00:00 2001
From: Josh Berry <tae...@gmail.com>
Date: Mon, 4 Aug 2014 22:46:46 -0400
Subject: [PATCH 2/2] Fix javascript exporting of results from node.js

* ob-js.el (org-babel-js-read): Expand regexps to account for newlines
  in output from node.js

It may be possible to instruct node.js to not insert line breaks
automatically.  Was not difficult to fix the regular expressions to
account for newlines, though.

I did *not* add a test file that goes over this, as I did not see one
already for ob-js.el.  I can certainly add one, if desired.

TINYCHANGE
---
 lisp/ob-js.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ob-js.el b/lisp/ob-js.el
index 7789449..9d956cc 100644
--- a/lisp/ob-js.el
+++ b/lisp/ob-js.el
@@ -97,13 +97,13 @@ This function is called by `org-babel-execute-src-block'"
 If RESULTS look like a table, then convert them into an
 Emacs-lisp table, otherwise return the results as a string."
   (org-babel-read
-   (if (and (stringp results) (string-match "^\\[.+\\]$" results))
+   (if (and (stringp results) (string-match "^\\[[\0-\377[:nonascii:]]*\\]$" results))
        (org-babel-read
         (concat "'"
                 (replace-regexp-in-string
                  "\\[" "(" (replace-regexp-in-string
                             "\\]" ")" (replace-regexp-in-string
-                                       ", " " " (replace-regexp-in-string
+                                       ",\\W" " " (replace-regexp-in-string
 						 "'" "\"" results))))))
      results)))
 
-- 
1.9.1

Reply via email to