File: entityref.rb

package info (click to toggle)
hiki 0.8.7-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,796 kB
  • ctags: 1,736
  • sloc: ruby: 20,269; lisp: 926; sh: 269; makefile: 12
file content (11 lines) | stat: -rw-r--r-- 234 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
# $Id: entityref.rb,v 1.3 2004/03/01 09:50:45 hitoshi Exp $
# Copyright (C) 2003 yoshimi <yoshimik@iris.dti.ne.jp>

def e( str )
  if str.respond_to?(:integer?) || str =~ /^(\d+)/
    %Q[&\##{str};]
  else
    %Q[&#{str};]
  end
end