0.0
No commit activity in last 3 years
No release in over 3 years
This rubygem does not have a description or summary.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

zfben_extend

A tool to extend ruby string.

Build Status

Install

gem 'zfben_extend'

Use

  ZfbenExtend::String.to_html('text http://link #tag mail@mail.com @user text', tag_url: '/tagurl/', user_url: '/userurl/')
  # => 'text <a href="http://link">http://link</a> <a href="/tagurl/tag">#tag</a> <a href="mailto:mail@mail.com">mail@mail.com</a> <a href="/userurl/user">@user</a> text'
  
  ZfbenExtend::String.to_cnbr('a.b', chars: /\./, br: '<hr />')
  # => 'a.<hr />b'
  
  ZfbenExtend::String.markdown('    a')
  # => <div class=\"CodeRay\">\n  <div class=\"code\"><pre>a\n</pre></div>\n</div>\n
  
  ZfbenExtend::String.markdown("```ruby\n    a\n```")
  # => <div class=\"CodeRay\">\n  <div class=\"code\"><pre>    a\n</pre></div>\n</div>\n

See more at https://github.com/benz303/zfben_extend/blob/master/test/string_test.rb