Skip to content

Commit

Permalink
Fix erroneous cosmetic changes in Pebble importer (#546)
Browse files Browse the repository at this point in the history
Merge pull request 546
  • Loading branch information
midzer authored Jul 23, 2024
1 parent e6f7f12 commit a8a04c2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/jekyll-import/importers/pebble.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def self.specify_options(c)
end

def self.process(opts)
options = { directory => opts.fetch("directory", "") }
options = { :directory => opts.fetch("directory", "") }

FileUtils.mkdir_p("_posts")
FileUtils.mkdir_p("_drafts")
Expand All @@ -28,11 +28,9 @@ def self.process(opts)
end

def self.traverse_posts_within(directory, &block)
Dir.foreach(directory) do |fd|
Dir.each_child(directory) do |fd|
path = File.join(directory, fd)
if fd.include?(".") || fd.include?("..")
next
elsif File.directory?(path)
if File.directory?(path)
traverse_posts_within(path, &block)
elsif path.end_with?("xml")
yield(path) if block_given?
Expand Down

0 comments on commit a8a04c2

Please sign in to comment.