Sha256: 86b4fb7c9b38584cd447d99637a19d8718ae95402375bbc4e8581b797af472d9
Contents?: true
Size: 315 Bytes
Versions: 2
Compression:
Stored size: 315 Bytes
Contents
require 'cgi' class Logi ; end module Logi::Command; end module Logi::Command::Wiki module_function def run argv return unless File.exist?(argv.first) puts File.read(argv.first).gsub(/\[\[(.+?)(\|(.+?))?\]\]/){ %Q{<a href="/#{CGI.escape_html($1)}.html">#{$3 || $1}</a>} } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
logi-0.1.1 | lib/logi/command/wiki.rb |
logi-0.1.0 | lib/logi/command/wiki.rb |