mirror of
https://github.com/foo-dogsquared/asciidoctor-foodogsquared-extensions.git
synced 2025-02-07 06:19:01 +00:00
Reformat codebase
This commit is contained in:
parent
0020083349
commit
2a69a330df
@ -1,2 +1,3 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'asciidoctor/foodogsquared-extensions'
|
require 'asciidoctor/foodogsquared-extensions'
|
||||||
|
@ -46,14 +46,14 @@ class GitHubRawIncludeProcessor < Asciidoctor::Extensions::IncludeProcessor
|
|||||||
# If the response is an array, it is likely to be a directory. In this
|
# If the response is an array, it is likely to be a directory. In this
|
||||||
# usecase, we'll just list them.
|
# usecase, we'll just list them.
|
||||||
content = if response.kind_of? Array
|
content = if response.kind_of? Array
|
||||||
warning = %(given path '#{path}' from GitHub repo '#{repo}' is a directory)
|
warning = %(given path '#{path}' from GitHub repo '#{repo}' is a directory)
|
||||||
warn_or_raise doc, warning
|
warn_or_raise doc, warning
|
||||||
warning
|
warning
|
||||||
elsif response.kind_of? Object
|
elsif response.kind_of? Object
|
||||||
if response['content'] && response['encoding'] == 'base64'
|
if response['content'] && response['encoding'] == 'base64'
|
||||||
Base64.decode64 response['content']
|
Base64.decode64 response['content']
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
reader.push_include content, target, target, 1, attrs
|
reader.push_include content, target, target, 1, attrs
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user