Method: Github::Client::Markdown#render_raw
- Defined in:
- lib/github_api2/client/markdown.rb
#render_raw(*args) ⇒ Object
Render a Markdown document in raw mode
Input
The raw API it not JSON-based. It takes a Markdown document as plaintext
<tt>text/plain</tt> or <tt>text/x-markdown</tt> and renders it as plain
Markdown without a repository context (just like a README.md file is
rendered – this is the simplest way to preview a readme online)
Examples
github = Github.new
github.markdown.render_raw "Hello github/linguist#1 **cool**, and #1!",
"accept": "text/plain",
52 53 54 55 56 57 58 59 |
# File 'lib/github_api2/client/markdown.rb', line 52 def render_raw(*args) params = arguments(args).params params['data'] = args.shift params['raw'] = true params['accept'] = params.fetch('accept') { 'text/plain' } post_request("markdown/raw", params) end |