Attachment 'kbd2.py'

Download

   1 # Text highlighting (trivial) without additional css entry
   2 # copyright: Peter Huebert.
   3 
   4 # This program is free software; you can redistribute it and/or modify
   5 # it under the terms of the GNU General Public License as published by
   6 # the Free Software Foundation; either version 2 of the License, or
   7 # (at your option) any later version.
   8 #
   9 # This program is distributed in the hope that it will be useful,
  10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12 # GNU General Public License for more details.
  13 #
  14 # You should have received a copy of the GNU General Public License
  15 # along with this program; if not, write to the Free Software
  16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  17 
  18 
  19 Dependencies = []
  20 
  21 from MoinMoin import wikiutil
  22 
  23 def execute(macro, args):
  24     try:
  25          return macro.formatter.rawHTML('<kbd style="border: 0.2em solid; border-color: #DDD #BBB #BBB #DDD; padding: 0 0.4em; background: #EEE; white-space: nowrap">%s</kbd>' % wikiutil.escape(args)) 
  26     except:
  27          return macro.formatter.escapedText(args)
  28 
  29 #execute

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2009-07-27 09:33:04, 0.3 KB) [[attachment:kbd.css]]
  • [get | view] (2009-07-27 09:29:49, 1.0 KB) [[attachment:kbd.py]]
  • [get | view] (2010-02-19 11:21:38, 1.2 KB) [[attachment:kbd2.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.