Skip to content

In unix given a directory, tidy will generate a document! #391

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

Closed
geoffmcl opened this issue Apr 2, 2016 · 4 comments
Closed

In unix given a directory, tidy will generate a document! #391

geoffmcl opened this issue Apr 2, 2016 · 4 comments
Labels
Milestone

Comments

@geoffmcl
Copy link
Contributor

geoffmcl commented Apr 2, 2016

In combing through, and closing all the old SF bugs as out-of-date, came across Bug 744, created: 2005-12-06 by Jeff Pohlmeyer, and he even offered a simple solution...

Problem: only in linux

$ tidy /usr/bin
line 1 column 1 - Warning: inserting missing 'title' element
Info: Document content looks like HTML5
Tidy found 1 warning and 0 errors!

<!DOCTYPE html>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.1.50">
<title></title>
</head>
<body>
</body>
</html>
...

While that might be funny! Ha, ha, it is a bug in my book.

And also do not like the simple Error: Can't open "dir-name" in Windows. It is not just can not open, it is a directory, and should say so!

Patch or PR welcome... thanks...

@geoffmcl geoffmcl added the Bug label Apr 2, 2016
@geoffmcl geoffmcl added this to the 5.3 milestone Apr 2, 2016
@geoffmcl
Copy link
Contributor Author

Since we about to release a 5.4, and no work has been done on this, am moving it to next 5.5... thanks...

@geoffmcl geoffmcl modified the milestones: 5.5, 5.3 Feb 28, 2017
@balthisar
Copy link
Member

@geoffmcl, I'd suggest the expedient fix would be the console application... should be an easy check. A more robust solution would be to implement this is the library and add a new message, because TY_(FileError) is used all over the place.

balthisar added a commit that referenced this issue May 7, 2017
- Add a check upon opening a file for validity of the file.
- Add a new message to indicate that the path is not a file.
@balthisar
Copy link
Member

I ended up with a simple fix in the library, including a new message. Tested on macOS and Windows.

balthisar added a commit that referenced this issue May 11, 2017
Address #391. Tested on macOS and Win10.
balthisar added a commit that referenced this issue May 11, 2017
@balthisar
Copy link
Member

Thanks for the fix, @geoffmcl. I've merged it, so will close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants