jekyll / jekyll-import

:inbox_tray: The "jekyll import" command for importing from various blogs to Jekyll format.
https://import.jekyllrb.com
MIT License
515 stars 316 forks source link

Fix erroneous cosmetic changes in Pebble importer #546

Closed midzer closed 3 months ago

midzer commented 3 months ago

(Trying) to fix https://github.com/jekyll/jekyll-import/pull/545

ashmaroli commented 3 months ago

and both ways appear to match desired file names.

@midzer :) the thing is that both forms are 99% equivalent. The gotcha with Ruby compared to Python is that one can have multiple ways to implement the same idea. Therefore, if something; next item; end is almost equivalent to next item if something.

What Parker highlighted in his explanation is that creating the array [".", ".."] for each iteration is waste of resources, albeit hardly noticeable in most situations. To that end, your suggestion to use Dir.each_child is indeed a superior alternative. It's just that we would have to be certain that subdirectories are handled properly as well (Disclaimer: I'm not totally familiar with the pebble platform or the importer code).

ashmaroli commented 3 months ago

LGTM!

@jekyllbot: merge +dev

ashmaroli commented 3 months ago

Thank you @midzer. :)