From d40eed5437e89110a9df6c10c2dce740f5597cbc Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Thu, 4 Jan 2007 06:35:45 +0000 Subject: [PATCH] Fix initial blank line in tag 2007-01-04 Michael Olson * lisp/muse-html.el (muse-html-src-tag): Remove initial blank line. * lisp/muse-publish.el (muse-publish-markup-tags): Make "src" point to muse-publish-src-tag by default, since and have different parameters. (muse-publish-src-tag): New barebones publishing function for , which is superseded when publishing in an HTML-based style. git-archimport-id: mwolson@gnu.org--2006/muse--main--1.0--patch-265 --- ChangeLog | 11 +++++++++++ lisp/muse-html.el | 4 ++-- lisp/muse-publish.el | 5 ++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c039437..6bdb0ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-01-04 Michael Olson + + * lisp/muse-html.el (muse-html-src-tag): Remove initial blank + line. + + * lisp/muse-publish.el (muse-publish-markup-tags): Make "src" + point to muse-publish-src-tag by default, since and + have different parameters. + (muse-publish-src-tag): New barebones publishing function for + , which is superseded when publishing in an HTML-based style. + 2007-01-03 Michael Olson * lisp/muse-html.el (muse-html-src-tag): Document. diff --git a/lisp/muse-html.el b/lisp/muse-html.el index ac6b167..468dada 100644 --- a/lisp/muse-html.el +++ b/lisp/muse-html.el @@ -586,8 +586,8 @@ This tag requires htmlize 1.34 or later in order to work." (narrow-to-region (point) (point)) (insert htmltext) (goto-char (point-min)) - (re-search-forward "]*\\)>" nil t) - (replace-match " class=\"src\"" t t nil 1) + (re-search-forward "]*\\)>\n?" nil t) + (replace-match "
")
         (goto-char (point-max))
         (muse-publish-mark-read-only (point-min) (point-max))))))
 
diff --git a/lisp/muse-publish.el b/lisp/muse-publish.el
index c1df092..e5a74d0 100644
--- a/lisp/muse-publish.el
+++ b/lisp/muse-publish.el
@@ -244,7 +244,7 @@ current style."
   '(("contents" nil t   nil muse-publish-contents-tag)
     ("verse"    t   nil nil muse-publish-verse-tag)
     ("example"  t   nil nil muse-publish-example-tag)
-    ("src"      t   t   nil muse-publish-example-tag)
+    ("src"      t   t   nil muse-publish-src-tag)
     ("code"     t   nil nil muse-publish-code-tag)
     ("quote"    t   nil t   muse-publish-quote-tag)
     ("literal"  t   nil nil muse-publish-mark-read-only)
@@ -1535,6 +1535,9 @@ This is usually applied to explicit links."
   (insert (muse-markup-text 'end-literal))
   (muse-publish-mark-read-only beg (point)))
 
+(defun muse-publish-src-tag (beg end attrs)
+  (muse-publish-example-tag beg end))
+
 (defun muse-publish-example-tag (beg end)
   (muse-publish-escape-specials beg end nil 'example)
   (goto-char beg)
-- 
2.11.4.GIT