[Pmwiki-users] inserting an "as-is" block of text in wiki pages

Pedro Miller Rabinovitch miller
Wed Oct 22 13:21:38 CDT 2003


Try using Beautifier (it's in the Cookbook), I'm using it for Lua code, works 
like a charm.

(Check 
http://tcs01.les.inf.puc-rio.br/wiki/w/LuaLanguage/AddingLuaSourceCode
for a live sample.)

Of course, it requires a wee bit of code-meddling.

Boa sorte,

	Pedro.

On Wednesday 22 October 2003 15:17, fcecin at inf.ufrgs.br wrote:
> How do I insert a block of text in a pmwiki page that is pre-formatted and
> that should not have it's wiki words interpreted?
>
> I tried to use:
>
> [=
> text
> text
> =]
>
> but then I lose the linebreaks. I also tried to use:
>
>   text
>   text
>
> (with spaces in front) but then I get wikiwords interpreted. I can use
> spaces in front together with one [= .... =] per line, but this would be a
> real pain.
>
> What I am trying to do is paste (Java) code in the wiki, but I don't find a
> way to leave it preformatted and without wikiword interpretation. Also,
> inserting a space between every line is not a perfect solution. What I
> really needed was HTML's <pre>...</pre> tag with the additional benefit of
> not interpreting wikiwords or other wiki markup.
>
> Here is an example:
>
> ----
>
> class Tarefa {
>
>   public void executar() {
>
>      System.out.println("Executando uma tarefa...");
>
>      try {
>        Thread.sleep(1000);
>      } catch (InterruptedException ex) { }
>
>      System.out.println("Terminou de executar uma tarefa!");
>   }
> }
>
> ----
>
> In this example, "InterruptedException" gets interpreted as wikiword, and
> if somebody tries to cut and paste this code, he/she will get
> "InterruptedException?" in the code which will obviously not compile :-)
>
> []'s
> Fabio
>
> _______________________________________________
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com




More information about the pmwiki-users mailing list