threedaymonk / htmlbeautifier

A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.
MIT License
325 stars 59 forks source link

remove relative_path_from call #69

Closed mweitzel closed 2 years ago

mweitzel commented 2 years ago

resolves https://github.com/threedaymonk/htmlbeautifier/issues/65

When originally implemented, the relative_path_from Dir.pwd was purely to keep the assertion results consistent across systems. The path_to helper in the specs reference absolute paths, so instead I've redacted the path in the spec.

The actual bin/htmlbeautifier should not be coercing the path into a relative one. This change will give more consistent output to the user. If a relative path is provided, its failure message will be relative. If an absolute path is provided, its failure message will be absolute.

threedaymonk commented 2 years ago

Makes sense to me. Thank you.

threedaymonk commented 2 years ago

Released in 1.4.2