module Gitlab::Client::Markdown

Defines methods related to markdown. @see docs.gitlab.com/ce/api/markdown.html

Public Instance Methods

markdown(text, options = {}) click to toggle source

Render an arbitrary Markdown document

@example

Gitlab.markdown('Hello world! :tada:')
Gitlab.markdown('Hello world! :tada:', gfm: true, project: 'group_example/project_example')

@param [String] text The markdown text to render. @param [Hash] options A customizable set of options. @option options [Boolean] :gfm(optional) Render text using GitLab Flavored Markdown. Default is false. @option options [String] :project(optional) Use project as a context when creating references using GitLab Flavored Markdown. Authentication is required if a project is not public. @return <Gitlab::ObjectifiedHash> Returns the rendered markdown as response

# File lib/gitlab/client/markdown.rb, line 18
def markdown(text, options = {})
  body = { text: text }.merge(options)
  post('/markdown', body: body)
end