From iainhaslam at gmail.com Mon Mar 20 11:28:26 2006 From: iainhaslam at gmail.com (Iain Haslam) Date: Mon, 20 Mar 2006 16:28:26 +0000 Subject: Code blocks Message-ID: <5f7436c0603200828y3d600efag66443f15ac8d743a@mail.gmail.com> Hello, In November 2005, there was a discussion on this list regarding code blocks. The suggestion was to use: ```(test) here it is ``` which becomes:

here it is
However, a textile format for this already exists elsewhere (see [1]), which I think is more appropriate: bc.(test) here it is Note the similarity between bc. and bq. I have implemented this (based on webgen 3.0.4 code, since the SVN server for recent code seems to be down). I have also added support for syntax-highlighting, with much code taken from source2html, although the interface is completely different. There are still a few bugs in the colouring, but I could resolve them fairly quickly if there was any interest. For my own part, this is fantastically useful for including prettied codes on my site with no additional work besides copy/pasting the code and defining its language. A few examples, along with the full amended (and somewhat messy) source code for those who are interested, are available from http://www.durham.ac.uk/i.w.haslam/Misc/Notebooks/textile_bc.html Is there interest in this? Would you like me to work this up into something suitable for inclusion in a future release? Any other comments on it? Regards, Iain Haslam. [1] http://blog.thought-mesh.net/mt-static/docs/mtmanual_textile.html#block%20formatting From etienne.durand at mail.com Fri Mar 24 01:40:05 2006 From: etienne.durand at mail.com (Jean-Etienne Durand) Date: Fri, 24 Mar 2006 07:40:05 +0100 Subject: Escaping characters Message-ID: <44239445.4020505@mail.com> Hi, I am writing some help about post formatting. I am using redcloth to format the text, and in a FAQ, also formatted with redcloth, I explain what to type to what to obtain. So, how could I escape '*', '#' & Co, to have an output like Type *word* to obtain word I tried "Type **word** to obtain *word*", but does not work. Any help? Jean-Etienne From assaph at gmail.com Fri Mar 24 03:53:52 2006 From: assaph at gmail.com (Assaph Mehr) Date: Fri, 24 Mar 2006 19:53:52 +1100 Subject: Escaping characters In-Reply-To: <44239445.4020505@mail.com> References: <44239445.4020505@mail.com> Message-ID: <3ff47be90603240053w55d6621cld7ba369d3394774e@mail.gmail.com> > So, how could I escape '*', '#' & Co, to have an output like > > Type *word* to obtain word > Try: Type *word* to obtain word From etienne.durand at mail.com Fri Mar 24 04:55:09 2006 From: etienne.durand at mail.com (Jean-Etienne Durand) Date: Fri, 24 Mar 2006 10:55:09 +0100 Subject: Escaping characters In-Reply-To: <3ff47be90603240053w55d6621cld7ba369d3394774e@mail.gmail.com> References: <44239445.4020505@mail.com> <3ff47be90603240053w55d6621cld7ba369d3394774e@mail.gmail.com> Message-ID: <4423C1FD.5020908@mail.com> Thank you. I have a second question. How can I include lists in a table? I did that: |_. What you type |_. What users see | | # A first item # A second item # A third item | # A first item # A second item # A third item | But the table is not recognized. If I put all # in one line, of course, the list is not recognized :( Any idea? Assaph Mehr wrote: >> So, how could I escape '*', '#' & Co, to have an output like >> >> Type *word* to obtain word >> > > Try: > > > Type *word* to obtain word > > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > From assaph at gmail.com Fri Mar 24 05:09:03 2006 From: assaph at gmail.com (Assaph Mehr) Date: Fri, 24 Mar 2006 21:09:03 +1100 Subject: Escaping characters In-Reply-To: <4423C1FD.5020908@mail.com> References: <44239445.4020505@mail.com> <3ff47be90603240053w55d6621cld7ba369d3394774e@mail.gmail.com> <4423C1FD.5020908@mail.com> Message-ID: <3ff47be90603240209i4a8477b8n237337f189c6ecdf@mail.gmail.com> On 3/24/06, Jean-Etienne Durand wrote: > Thank you. > I have a second question. How can I include lists in a table? Not 100% sure, but I think textile support for tables is rather limited, especially since each row has to be on a separate line and lists also rely on line breaks. If you want something like this you should probably construct the table by hand with HTML tags. I could be wrong though. Cheers, Assaph From Bil.Kleb at NASA.GOV Fri Mar 24 06:07:39 2006 From: Bil.Kleb at NASA.GOV (Bil Kleb) Date: Fri, 24 Mar 2006 06:07:39 -0500 Subject: Escaping characters In-Reply-To: <44239445.4020505@mail.com> References: <44239445.4020505@mail.com> Message-ID: <4423D2FB.30906@NASA.gov> Jean-Etienne Durand wrote: > > So, how could I escape '*', '#' & Co In a Soks wiki (which uses Redcloth for markup), I would use '==*word*==' to get '*word*', but I don't know if Soks has extended Redcloth... Regards, -- Bil Kleb http://fun3d.larc.nasa.gov From assaph at gmail.com Fri Mar 24 07:54:36 2006 From: assaph at gmail.com (Assaph Mehr) Date: Fri, 24 Mar 2006 23:54:36 +1100 Subject: Escaping characters In-Reply-To: <4423D2FB.30906@NASA.gov> References: <44239445.4020505@mail.com> <4423D2FB.30906@NASA.gov> Message-ID: <3ff47be90603240454i426f2d19l423c65149de8c7e6@mail.gmail.com> > > So, how could I escape '*', '#' & Co > > In a Soks wiki (which uses Redcloth for markup), I would use > '==*word*==' to get '*word*', but I don't know if Soks has extended > Redcloth... Cute, wasn't aware of this. Looking at the RedCloth sources, this is a redcloth thing. It translates ==...== to .... This works beautifully on instiki as well. Thanks for sharing, Assaph From Bil.Kleb at NASA.GOV Fri Mar 24 08:37:53 2006 From: Bil.Kleb at NASA.GOV (Bil Kleb) Date: Fri, 24 Mar 2006 08:37:53 -0500 Subject: Escaping characters In-Reply-To: <3ff47be90603240454i426f2d19l423c65149de8c7e6@mail.gmail.com> References: <44239445.4020505@mail.com> <4423D2FB.30906@NASA.gov> <3ff47be90603240454i426f2d19l423c65149de8c7e6@mail.gmail.com> Message-ID: <4423F631.6080706@NASA.gov> Assaph Mehr wrote: > > Cute, wasn't aware of this. Looking at the RedCloth sources, this is a > redcloth thing. It translates ==...== to .... > This works beautifully on instiki as well. There seems to be a bug though: when a paragraph follows this, e.g., =*no textile stuff*== New paragraph here. there is no paragraph break. It behaves as if the newlines are not there. Regards, -- Bil Kleb http://fun3d.larc.nasa.gov From assaph at gmail.com Fri Mar 24 19:52:59 2006 From: assaph at gmail.com (Assaph Mehr) Date: Sat, 25 Mar 2006 11:52:59 +1100 Subject: Escaping characters In-Reply-To: <4423F631.6080706@NASA.gov> References: <44239445.4020505@mail.com> <4423D2FB.30906@NASA.gov> <3ff47be90603240454i426f2d19l423c65149de8c7e6@mail.gmail.com> <4423F631.6080706@NASA.gov> Message-ID: <3ff47be90603241652l72e99fafpb32b28ec91703f41@mail.gmail.com> > > Cute, wasn't aware of this. Looking at the RedCloth sources, this is a > > redcloth thing. It translates ==...== to .... > > This works beautifully on instiki as well. > > There seems to be a bug though: when a paragraph follows > this, e.g., > > =*no textile stuff*== > > New paragraph here. > > there is no paragraph break. It behaves as if the newlines > are not there. It renders fine on my instance. The difference is that in Pimki I force RedCloth to use :hard_breaks (using version 3.0.4 of redcloth). Have you tried adding an extra line break between the lines? It sometimes helps. If not, you could probably add a manual paragraph-break element, or use the verbose tags. HTH, Assaph From Bil.Kleb at nasa.gov Sat Mar 25 08:18:38 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Sat, 25 Mar 2006 08:18:38 -0500 Subject: Escaping characters In-Reply-To: <3ff47be90603241652l72e99fafpb32b28ec91703f41@mail.gmail.com> References: <44239445.4020505@mail.com> <4423D2FB.30906@NASA.gov> <3ff47be90603240454i426f2d19l423c65149de8c7e6@mail.gmail.com> <4423F631.6080706@NASA.gov> <3ff47be90603241652l72e99fafpb32b28ec91703f41@mail.gmail.com> Message-ID: <4425432E.9040206@NASA.gov> Assaph Mehr wrote: > > It renders fine on my instance. The difference is that in Pimki I > force RedCloth to use :hard_breaks (using version 3.0.4 of redcloth). Soks doesn't use :hard_breaks. > Have you tried adding an extra line break between the lines? Yes. And adding trailing and leading spaces all over. > If not, you could probably add a manual > paragraph-break element That's what I resorted to. Regards, -- Bil, x4364 http://fun3d.larc.nasa.gov From assaph at gmail.com Sat Mar 25 17:23:27 2006 From: assaph at gmail.com (Assaph Mehr) Date: Sun, 26 Mar 2006 09:23:27 +1100 Subject: Escaping characters In-Reply-To: <4425432E.9040206@NASA.gov> References: <44239445.4020505@mail.com> <4423D2FB.30906@NASA.gov> <3ff47be90603240454i426f2d19l423c65149de8c7e6@mail.gmail.com> <4423F631.6080706@NASA.gov> <3ff47be90603241652l72e99fafpb32b28ec91703f41@mail.gmail.com> <4425432E.9040206@NASA.gov> Message-ID: <3ff47be90603251423h5d23811bne6e7ba24f68ef4d8@mail.gmail.com> > > It renders fine on my instance. The difference is that in Pimki I > > force RedCloth to use :hard_breaks (using version 3.0.4 of redcloth). > > Soks doesn't use :hard_breaks. You can override this. Quote: Setting :redcloth_hard_breaks => true in start.rb causes Redcloth to revert to the 2.x approach of turning every newline to a
. This is off by default (i.e. the default works like Redcloth 3.x) HTH, Assaph