mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
commit
a0c221725c
@ -6,4 +6,6 @@
|
|||||||
|
|
||||||
#+OPTIONS: author:nil num:nil
|
#+OPTIONS: author:nil num:nil
|
||||||
#+AUTHOR:
|
#+AUTHOR:
|
||||||
|
# org < 8.0 use +STYLE, after use +HTML_HEAD
|
||||||
#+STYLE: <link rel="stylesheet" type="text/css" href="stylesheets/manual.css" />
|
#+STYLE: <link rel="stylesheet" type="text/css" href="stylesheets/manual.css" />
|
||||||
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="stylesheets/manual.css" />
|
||||||
|
@ -27,9 +27,18 @@
|
|||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(require 'cl))
|
(require 'cl))
|
||||||
(require 'org)
|
(require 'org)
|
||||||
(require 'org-publish)
|
(or (require 'org-publish nil t)
|
||||||
|
(require 'ox-publish))
|
||||||
(require 'yasnippet) ; docstrings must be loaded
|
(require 'yasnippet) ; docstrings must be loaded
|
||||||
|
|
||||||
|
(defun yas--org-raw-html (tag content)
|
||||||
|
;; in version 8.0 org-mode changed the export syntax, see
|
||||||
|
;; http://orgmode.org/worg/org-8.0.html#sec-8-1
|
||||||
|
(format (if (version< org-version "8.0.0")
|
||||||
|
"@<%s>%s@</%s>" ; old: @<tag>
|
||||||
|
"@@html:<%s>@@%s@@html:</%s>@@") ; new: @@html:<tag>@@
|
||||||
|
tag content tag))
|
||||||
|
|
||||||
(defun yas--document-symbol (symbol level)
|
(defun yas--document-symbol (symbol level)
|
||||||
(flet ((concat-lines (&rest lines)
|
(flet ((concat-lines (&rest lines)
|
||||||
(mapconcat #'identity lines "\n")))
|
(mapconcat #'identity lines "\n")))
|
||||||
@ -71,7 +80,8 @@
|
|||||||
(prefix (downcase match1))
|
(prefix (downcase match1))
|
||||||
(suffix (match-string 2 match))
|
(suffix (match-string 2 match))
|
||||||
(fmt (cond
|
(fmt (cond
|
||||||
((member prefix args) "@<code>%s@</code>")
|
((member prefix args)
|
||||||
|
(yas--org-raw-html "code" "%s"))
|
||||||
((null suffix) "/%s/"))))
|
((null suffix) "/%s/"))))
|
||||||
(if fmt (format fmt prefix)
|
(if fmt (format fmt prefix)
|
||||||
match1)))
|
match1)))
|
||||||
@ -125,6 +135,7 @@
|
|||||||
(princ yas--version (current-buffer)))))
|
(princ yas--version (current-buffer)))))
|
||||||
(proj-plist
|
(proj-plist
|
||||||
(list
|
(list
|
||||||
|
:publishing-function 'org-html-publish-to-html
|
||||||
:base-directory dir :publishing-directory dir
|
:base-directory dir :publishing-directory dir
|
||||||
:html-preamble
|
:html-preamble
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user