redhataccess / ascii_binder

AsciiBinder is an AsciiDoc-based system for authoring and publishing closely related documentation sets from a single source.
https://asciibinder.net
MIT License
76 stars 39 forks source link

Why eliminate all file extensions? #104

Closed bexelbie closed 7 years ago

bexelbie commented 7 years ago

https://github.com/redhataccess/ascii_binder/blob/64d2e7e41e9165f343603bfc2639547d05d8256c/lib/ascii_binder/engine.rb#L155

This line and the following line, seem to exist to eliminate all portions of the file name that are preceeded by a dot.

i.e.

"foo.bar.baz.adoc" becomes "foo"

Why do we do this? Why not just eliminate the ".adoc" with something like:

File.join(File.dirname(path),File.basename(path,".adoc"))

I am working on a patch to propose where this is breaking behavior. While it is is considered bad form to have multiple dot separate components in a file name, I don't know why we should disallow it. For example, I believe the following should be valid:

installguide.workstation.adoc installguide.server.adoc insteallguide.noidea.adoc

nhr commented 7 years ago

Good catch. PR forthcoming.

nhr commented 7 years ago

Addressed in https://github.com/redhataccess/ascii_binder/pull/111