Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative images matter #23

Merged
merged 2 commits into from
Dec 25, 2013
Merged

Relative images matter #23

merged 2 commits into from
Dec 25, 2013

Conversation

gjtorikian
Copy link
Owner

gjtorikian added a commit that referenced this pull request Dec 25, 2013
@gjtorikian gjtorikian merged commit 001aa3a into master Dec 25, 2013
@gjtorikian gjtorikian deleted the relative-images-matter branch December 25, 2013 22:27
@@ -43,6 +43,7 @@ def run

def self.create_nokogiri(path)
path << "/index.html" if File.directory? path # support for Jekyll-style links
content = File.open(path, "rb") {|f| f.read }
Nokogiri::HTML(File.read(path))
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be Nokogiri::HTML(content), ugh.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😃

riccardoporreca added a commit to riccardoporreca/html-proofer that referenced this pull request Mar 14, 2023
* Most of the logic is legacy from the very early HTMLProofer, and is irrelevant not since `@filename` can only be the file where the link is defined, with `File.join` properly handling both same-directory, nested, and parent links, together with the ultimate `File.expand_path` in `absolute_path.
* The legacy logic comes pretty much from gjtorikian#6 and gjtorikian#23.
* This way we can also avoid `File.exist`, which can ultimately be delegated to checking the existence, not constructing the path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Too many open files" error
2 participants