]> code.delx.au - gnu-emacs/blobdiff - lisp/org/ox-org.el
Merge from trunk; up to 2014-02-23T23:41:17Z!lekktu@gmail.com.
[gnu-emacs] / lisp / org / ox-org.el
index 41798b3e123764b1f19d4c8e23d7018e42d3aa9a..3b2e55e2d459a62f469a2d3d5882786b96f600c8 100644 (file)
@@ -1,10 +1,12 @@
 ;;; ox-org.el --- Org Back-End for Org Export Engine
 
-;; Copyright (C) 2013  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2014 Free Software Foundation, Inc.
 
 ;; Author: Nicolas Goaziou <n.goaziou@gmail.com>
 ;; Keywords: org, wp
 
+;; This file is part of GNU Emacs.
+
 ;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation, either version 3 of the License, or
 
 ;;; Commentary:
 
-;; This library implements an Org back-end for Org exporter.
-;;
-;; It introduces two interactive functions, `org-org-export-as-org'
-;; and `org-org-export-to-org', which export, respectively, to
-;; a temporary buffer and to a file.
-;;
-;; A publishing function is also provided: `org-org-publish-to-org'.
-
 ;;; Code:
+
 (require 'ox)
 (declare-function htmlize-buffer "htmlize" (&optional buffer))
 
@@ -119,7 +114,10 @@ setting of `org-html-htmlize-output-type' is 'css."
 (defun org-org-identity (blob contents info)
   "Transcode BLOB element or object back into Org syntax.
 CONTENTS is its contents, as a string or nil.  INFO is ignored."
-  (org-export-expand blob contents t))
+  (let ((case-fold-search t))
+    (replace-regexp-in-string
+     "^[ \t]*#\\+ATTR_[-_A-Za-z0-9]+:\\(?: .*\\)?\n" ""
+     (org-export-expand blob contents t))))
 
 (defun org-org-headline (headline contents info)
   "Transcode HEADLINE element back into Org syntax.