Anonymous avatar Anonymous committed 4ca6488

Finally fixed a long-standing bug where *tag-library* and *package* appeared to have the wrong values during html generation (i.e., in the body of tag)

Comments (0)

Files changed (1)

 ;;;------------------------------------------------------------------------------------
 
 (defmethod tag-library-name-for-tag ( (*current-tag* htmltag) )
-  (package-name (symbol-package (tag-name *current-tag*) ) )
+  (intern (package-name (symbol-package (tag-name *current-tag*))) 'keyword)
   )
 
 (defmethod tag-attributes ( (some-tag-name symbol) )
 
      ,(when content
 	    `(defmethod render-tag-content ( (*current-tag* ,name) )
-	       ;; render the content expression instead of the usual content rendering
-	       (render-as-html (tags ,content) )
+	       ;; setup appropriate globals 
+	       (let* (
+		      ;; getting the tag library here does not involve a "forward reference"
+		      ;; as everything has already been defined above
+		      (*tag-library* (gethash (tag-library-name-for-tag *current-tag*) 
+					      *available-tag-libraries*
+					      ) 
+			)
+		      ;; this part is a bit of a forward reference, as we're
+		      ;; using an accessor on a tag library object
+		      (*package* (tag-library-package *tag-library*))
+		      )
+		 ;; render the content expression instead of the usual content rendering
+		 (render-as-html (tags ,content) )
+		 )
 	       )
 	    )
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.