[Pmwiki-users] [@Mono-spaced text with WikiWord@]

J. Meijer commentgg
Tue May 4 18:46:05 CDT 2004


I'd like to suggest the following markup as a shortcut for @@[= ... =]@@

  [@Mono-spaced text with WikiWords@]

I think the combination occurs frequently, partly because I tend to use it
instead of just @@...@@.

I implemented the syntax with a minimal patch of the PrintText() function:

  ...
  $text = htmlspecialchars($text,ENT_NOQUOTES);
  #start of modification
  $text = preg_replace("/\\[(\\=|@)(.*?)\\1\\]/se",
   "'$1$1'.Keep(str_replace('\\\"','\"','$2')).'$1$1'",$text);
  #original code:
  # $text = preg_replace("/\\[\\=(.*?)\\=\\]/se",
  #   "Keep(str_replace('\\\"','\"','$1'))",$text);
  ...

jm







More information about the pmwiki-users mailing list