From 2a69a330dfd6ac904c2dd9300bb7c546a8558832 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Tue, 7 Mar 2023 00:35:19 +0800 Subject: [PATCH] Reformat codebase --- lib/asciidoctor-foodogsquared-extensions.rb | 1 + .../extension.rb | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/asciidoctor-foodogsquared-extensions.rb b/lib/asciidoctor-foodogsquared-extensions.rb index d2a571d..5957c58 100644 --- a/lib/asciidoctor-foodogsquared-extensions.rb +++ b/lib/asciidoctor-foodogsquared-extensions.rb @@ -1,2 +1,3 @@ # frozen_string_literal: true + require 'asciidoctor/foodogsquared-extensions' diff --git a/lib/asciidoctor/github-raw-content-include-processor/extension.rb b/lib/asciidoctor/github-raw-content-include-processor/extension.rb index 32af086..c29ba61 100644 --- a/lib/asciidoctor/github-raw-content-include-processor/extension.rb +++ b/lib/asciidoctor/github-raw-content-include-processor/extension.rb @@ -46,14 +46,14 @@ class GitHubRawIncludeProcessor < Asciidoctor::Extensions::IncludeProcessor # If the response is an array, it is likely to be a directory. In this # usecase, we'll just list them. content = if response.kind_of? Array - warning = %(given path '#{path}' from GitHub repo '#{repo}' is a directory) - warn_or_raise doc, warning - warning - elsif response.kind_of? Object - if response['content'] && response['encoding'] == 'base64' - Base64.decode64 response['content'] - end - end + warning = %(given path '#{path}' from GitHub repo '#{repo}' is a directory) + warn_or_raise doc, warning + warning + elsif response.kind_of? Object + if response['content'] && response['encoding'] == 'base64' + Base64.decode64 response['content'] + end + end reader.push_include content, target, target, 1, attrs end