asciidoctor / asciidoctor-fopub

A portable DocBook-to-PDF build command that wraps DocBook XSL and Apache FOP
MIT License
113 stars 37 forks source link

"workaround for bogus errors using sed in OS X" provokes error under linux #68

Closed getreu closed 8 years ago

getreu commented 8 years ago

I had to revert pull request #64:

This reverts commit dedbd6f007550f2f20bc74da60f390337aa5b61c. Patch does provoke errors for me. I had to revoke it in my branch. Here the error message under debian 8 with sed (GNU sed) 4.2.2: can't read s:<(book|article):<!DOCTYPE \1 [<!ENTITYle or directory...

mojavelinux commented 8 years ago

We can't just revert the change because it would break OSX again. We need to find a way to make this command work on all platforms or use some sort of OS-specific conditional.

bsmith-n4 commented 8 years ago

I had a look into this again and the PR I opened has a misleading title: I was encountering bogus warnings, not errors, and could successfully generate a target document. If #64 prevents conversion completely on debian, it would make sense to revert but rename this issue to find a POSIX fix for the use of sed.

bsmith-n4 commented 8 years ago

OK, after trying a few approaches to this problem, this one seems to be the cleanest while still using sed and avoiding the creation of unwanted backup files:

https://github.com/asciidoctor/asciidoctor-fopub/compare/master...bsmith-n4:sed-port

@getreu do you want to test this fix on debian? Branch is found at the following:

https://github.com/bsmith-n4/asciidoctor-fopub/tree/sed-port

thanks

mojavelinux commented 8 years ago

Thanks @bsmith-n4!

getreu commented 8 years ago

@bsmith-n4 : it works for me. Thank you! @mojavelinux : I wait for your merge into master and will then synchronize my branch with it. Please also have a look in other recent changes, especially -H.