From andy.arvid at gmail.com Wed Dec 5 04:01:46 2012 From: andy.arvid at gmail.com (Andy Peterson) Date: Wed, 5 Dec 2012 01:01:46 -0300 Subject: [cl-markdown-devel] Bug with multiple instances of the same extension on the same line. Message-ID: Gary, When you have multiple instances of the same extension (with different arguments) on the same line, each instance repeats the first instance. If you trace the function call, each instance calls the function with the arguments of the first call. If you put in a line break between the extension instances, markdown works correctly. Below is some test code demonstrating the error andy (in-package :markdown) (defextension (link-new :arguments ((text :required) (href :required)) :insertp t) (ecase phase (:parse ;; no worries ) (:render (format nil "~a" href text)))) (defparameter *cliki* "Cliki link here: {link-new \"cliki\" \"http://www.cliki.net\"}.") (defparameter *google* "Google link here: {link-new \"google\" \"http://www.google.com\"}.") (defparameter *test-one-line* (concatenate 'string *cliki* " " *google*)) (defparameter *test-two-lines* (concatenate 'string *cliki* (string #\Newline) *google*)) (defun test-string (str) (let ((*render-active-functions* (append '(link-new) *render-active-functions*))) (nth-value 1 (markdown str :stream nil)))) MARKDOWN> (trace link-new) (LINK-NEW) MARKDOWN> (test-string *test-one-line*) 0: (LINK-NEW :RENDER ("cliki" "http://www.cliki.net") NIL) 0: LINK-NEW returned "cliki" 0: (LINK-NEW :RENDER ("cliki" "http://www.cliki.net") NIL) 0: LINK-NEW returned "cliki" "

Cliki link here: cliki. Google link here: cliki.

" MARKDOWN> (test-string *test-two-lines*) 0: (LINK-NEW :RENDER ("cliki" "http://www.cliki.net") NIL) 0: LINK-NEW returned "cliki" 0: (LINK-NEW :RENDER ("google" "http://www.google.com") NIL) 0: LINK-NEW returned "google" "

Cliki link here: cliki. Google link here: google.

" MARKDOWN> -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.arvid at gmail.com Wed Dec 5 16:17:11 2012 From: andy.arvid at gmail.com (Andy Peterson) Date: Wed, 5 Dec 2012 13:17:11 -0300 Subject: [cl-markdown-devel] Bug with multiple instances of the same extension on the same line. In-Reply-To: References: Message-ID: Gary, Sorry, this bug is fixed in the github version but not in the quicklisp version (darcs). The bug was in utilities.lisp, function process-brackets with the variable buffer-count not being incremented BTW: in order to load the github version I had to comment this line #-asdf-system-connections :container-dynamic-classes from cl-markdown.asd. I don't know where this system is defined. andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gwking at metabang.com Thu Dec 6 20:20:34 2012 From: gwking at metabang.com (Gary King) Date: Thu, 6 Dec 2012 15:20:34 -0500 Subject: [cl-markdown-devel] Bug with multiple instances of the same extension on the same line. In-Reply-To: References: Message-ID: <753FDAB3-BC22-482A-B72C-60E3FDC1C058@metabang.com> Hi Andy, thanks for the update and for letting me know about the issue. I'll let Zach know that QuickLisp should be using the github version. regards, On Dec 5, 2012, at 11:17 AM, Andy Peterson wrote: > Gary, > > Sorry, this bug is fixed in the github version but not in the quicklisp version (darcs). > > The bug was in utilities.lisp, function process-brackets with the variable buffer-count not being incremented > > BTW: in order to load the github version I had to comment this line > #-asdf-system-connections :container-dynamic-classes > from cl-markdown.asd. > I don't know where this system is defined. > > andy > _______________________________________________ > cl-markdown-devel mailing list > cl-markdown-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/cl-markdown-devel -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: