diff options
author | Jan Christophersen <jan@ruken.pw> | 2017-02-11 22:15:01 +0300 |
---|---|---|
committer | Jan Christophersen <jan@ruken.pw> | 2017-02-20 18:37:44 +0300 |
commit | 95ed01749e0ffe55a979acb246ca8e0ae663bffb (patch) | |
tree | 2c9f402d710de118e20b69e1d9b6286f50887a97 /lib | |
parent | edb8ed36cd5ce315ca45a047bd06ab1dfcf44203 (diff) |
Add AsciiDoc snippet for CI/CD Badges
This commit adds CI/CD Badges Snippets for AsciiDoc as requested in #26087.
I've however run into an issue in highlighting the snippet, it seems as if AsciiDoc is currently not being highlighted properly (displayed as plaintext)
Add testcase for to_asciidoc
Update test case for Badges list
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/badge/metadata.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/badge/metadata.rb b/lib/gitlab/badge/metadata.rb index 548f85b78bb..4a049ef758d 100644 --- a/lib/gitlab/badge/metadata.rb +++ b/lib/gitlab/badge/metadata.rb @@ -20,6 +20,10 @@ module Gitlab "[![#{title}](#{image_url})](#{link_url})" end + def to_asciidoc + "image:#{image_url}[link=\"#{link_url}\",title=\"#{title}\"]" + end + def title raise NotImplementedError end |