Parcourir la Source

Rename render-content to render-text for clarity. Retroactively add to 0.9.3.

Brit Butler il y a 11 ans
Parent
commit
5e9a256a91
6 fichiers modifiés avec 8 ajouts et 7 suppressions
  1. 1 0
      NEWS.md
  2. 1 1
      docs/plugin-api.md
  3. 2 2
      plugins/rst.lisp
  4. 2 2
      src/coleslaw.lisp
  5. 1 1
      src/packages.lisp
  6. 1 1
      src/posts.lisp

+ 1 - 0
NEWS.md

@@ -1,6 +1,7 @@
1 1
 ## Changes for 0.9.3 (2013-04-16):
2 2
 
3 3
 * **INCOMPATIBLE CHANGE**: `page-path` and the `blog` config class are no longer exported.
4
+* **INCOMPATIBLE CHANGE**: `render-content` has been renamed `render-text` for clarity.
4 5
 * New Docs: [A Hacker's Guide to Coleslaw](hacking_guide) and [Themes](theming_guide)!
5 6
 * A new theme *readable* based on bootswatch readable, courtesy of @rmoritz!
6 7
 * Posts may have an author to support multi-user blogs courtesy of @tychoish.

+ 1 - 1
docs/plugin-api.md

@@ -28,7 +28,7 @@
28 28
 
29 29
 * **New markup formats**, for example the
30 30
   [ReStructuredText plugin](http://github.com/redline6561/coleslaw/blob/master/plugins/rst.lisp),
31
-  can be created by definining an appropriate `render-content`
31
+  can be created by definining an appropriate `render-text`
32 32
   method. The method takes `text` and `format` arguments and is
33 33
   [EQL-specialized](http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html#defmethod)
34 34
   on the format. Format should be a keyword matching the file

+ 2 - 2
plugins/rst.lisp

@@ -3,7 +3,7 @@
3 3
 
4 4
 (defpackage :coleslaw-rst
5 5
   (:use :cl)
6
-  (:import-from :coleslaw #:render-content)
6
+  (:import-from :coleslaw #:render-text)
7 7
   (:import-from :docutils #:read-rst #:write-part #:register-settings-spec
8 8
                           #:visit-node #:write-document)
9 9
   (:import-from :docutils.writer.html #:html-writer #:write-part)
@@ -11,7 +11,7 @@
11 11
 
12 12
 (in-package :coleslaw-rst)
13 13
 
14
-(defmethod render-content (text (format (eql :rst)))
14
+(defmethod render-text (text (format (eql :rst)))
15 15
   (register-settings-spec '((:generator nil)
16 16
                             (:datestamp nil)))
17 17
   (with-output-to-string (str)

+ 2 - 2
src/coleslaw.lisp

@@ -58,8 +58,8 @@
58 58
            (content (construct content-type (read-content file))))
59 59
       (write-page "tmp.html" (render-page content)))))
60 60
 
61
-(defgeneric render-content (text format)
62
-  (:documentation "Compile TEXT from the given FORMAT to HTML for display.")
61
+(defgeneric render-text (text format)
62
+  (:documentation "Render TEXT of the given FORMAT to HTML for display.")
63 63
   (:method (text (format (eql :html)))
64 64
     text)
65 65
   (:method (text (format (eql :md)))

+ 1 - 1
src/packages.lisp

@@ -13,7 +13,7 @@
13 13
            #:content
14 14
            #:post
15 15
            #:index
16
-           #:render-content
16
+           #:render-text
17 17
            #:add-injection
18 18
            ;; The Document Protocol
19 19
            #:add-document

+ 1 - 1
src/posts.lisp

@@ -12,7 +12,7 @@
12 12
                    (text content-text)) object
13 13
       (setf (content-slug object) (slugify title)
14 14
             format (make-keyword (string-upcase format))
15
-            text (render-content text format)
15
+            text (render-text text format)
16 16
             author (or author (author *config*)))))
17 17
 
18 18
 (defmethod render ((object post) &key prev next)