Ensure absolute URLs for single lines from Banzai for HipChat
"pipeline: :single_line" leaves the protocol/host part out of the URLs and caches them that way. To avoid giving those out to HipChat, markdown is always rendered with "pipeline: :email" first. There must be a better way to do this, but I can't see how to avoid the link caching.
This commit is contained in:
parent
eb074021b0
commit
b434b75fd0
|
@ -125,12 +125,16 @@ class HipchatService < Service
|
|||
message
|
||||
end
|
||||
|
||||
def markdown(text, context = {})
|
||||
def markdown(text, options = {})
|
||||
if text
|
||||
context = ({
|
||||
context = {
|
||||
project: project,
|
||||
pipeline: :email
|
||||
}).merge(context)
|
||||
}
|
||||
|
||||
Banzai.render(text, context)
|
||||
|
||||
context.merge!(options)
|
||||
|
||||
html = Banzai.render(text, context)
|
||||
html = Banzai.post_process(html, context)
|
||||
|
|
Loading…
Reference in New Issue