Sha256: c092a4f0a90a7dd1ddfe159ee3424fc2c2dcda8dfe698b68701b9650959b4f1c

Contents?: true

Size: 262 Bytes

Versions: 52

Compression:

Stored size: 262 Bytes

Contents

def gh_link(gh_identifier, text=nil)
	text = gh_identifier.split('/').last if text.nil?
	id_and_name, number = gh_identifier.split('#')

	url = "https://github.com/#{id_and_name}"
	url = url + "/issues/#{number}" if number

	"<a href='#{url}'>#{h text}</a>"
end

Version data entries

52 entries across 46 versions & 2 rubygems

Version Path
tdiary-contrib-5.3.0 plugin/github_link.rb
tdiary-contrib-5.2.4 plugin/github_link.rb
tdiary-contrib-5.2.3 plugin/github_link.rb
tdiary-contrib-5.2.2 plugin/github_link.rb
tdiary-contrib-5.2.1 plugin/github_link.rb
tdiary-contrib-5.2.0 plugin/github_link.rb
tdiary-contrib-5.1.7 plugin/github_link.rb
tdiary-contrib-5.1.6 plugin/github_link.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/plugin/github_link.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/bundler/gems/tdiary-contrib-d1e41204db13/plugin/github_link.rb
tdiary-contrib-5.1.5 plugin/github_link.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/plugin/github_link.rb
tdiary-contrib-5.1.4 plugin/github_link.rb
tdiary-contrib-5.1.3 plugin/github_link.rb
tdiary-contrib-5.1.2 plugin/github_link.rb
tdiary-contrib-5.1.1 plugin/github_link.rb
tdiary-contrib-5.1.0 plugin/github_link.rb
tdiary-contrib-5.0.13 plugin/github_link.rb
tdiary-contrib-5.0.12 plugin/github_link.rb
tdiary-contrib-5.0.11 plugin/github_link.rb