Skip to content
Snippets Groups Projects
Commit 0dee44a6 authored by Yu ISHIKAWA's avatar Yu ISHIKAWA Committed by Andrew Or
Browse files

[MINOR] Remove unnecessary spaces in `include_example.rb`

Author: Yu ISHIKAWA <yuu.ishikawa@gmail.com>

Closes #9960 from yu-iskw/minor-remove-spaces.
parent dc1d324f
No related branches found
No related tags found
No related merge requests found
...@@ -20,12 +20,12 @@ require 'pygments' ...@@ -20,12 +20,12 @@ require 'pygments'
module Jekyll module Jekyll
class IncludeExampleTag < Liquid::Tag class IncludeExampleTag < Liquid::Tag
def initialize(tag_name, markup, tokens) def initialize(tag_name, markup, tokens)
@markup = markup @markup = markup
super super
end end
def render(context) def render(context)
site = context.registers[:site] site = context.registers[:site]
config_dir = '../examples/src/main' config_dir = '../examples/src/main'
...@@ -37,7 +37,7 @@ module Jekyll ...@@ -37,7 +37,7 @@ module Jekyll
code = File.open(@file).read.encode("UTF-8") code = File.open(@file).read.encode("UTF-8")
code = select_lines(code) code = select_lines(code)
rendered_code = Pygments.highlight(code, :lexer => @lang) rendered_code = Pygments.highlight(code, :lexer => @lang)
hint = "<div><small>Find full example code at " \ hint = "<div><small>Find full example code at " \
...@@ -45,7 +45,7 @@ module Jekyll ...@@ -45,7 +45,7 @@ module Jekyll
rendered_code + hint rendered_code + hint
end end
# Trim the code block so as to have the same indention, regardless of their positions in the # Trim the code block so as to have the same indention, regardless of their positions in the
# code file. # code file.
def trim_codeblock(lines) def trim_codeblock(lines)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment