rtomayko/shocco

Wrong alignment

Closed this issue · 7 comments

So I tried using this, it seems the alignment is wrong.
More specifically the code-part seems to have one empty section more.
See a test script and page.

I tried shocco /usr/bin/shocco > test.html too and seems to have the same problem.
So I guess it's not a problem with my script.

Any suggestions ? Does anyone else get that ?

anybody ? can one of the 46 current watchers test the result with the executable itself ?
shocco /usr/bin/shocco > /tmp/shocco-test.html
open it with your browser, does it look as good as the webpage?

Have you tried taking the blank comment out from under the shebang and before the licence?

Tested it, that fixed it for me:
shocco retrieve.sh | browser

Tested on a different computer too and it wasn't broken at all with the space, have you reinstalled?

Last test, it does have issues with these characters, but it seems unrelated α-ωΑ-Ω.

yep, tried it. Also tried removing the whole license, even removing any comments but the first two or just the first, but no luck. The thing is this happens with the shocco script itself. It won't produce the same page as the project's homepage.
Here is what shocco /usr/bin/shocco > /tmp/shocco.html produces for me.

It works correct for me on several computers, all Macbooks and all using Homebrew. It could be a Pygments issue.

oh Pygments, yes. That's a possible issue for me. Will test that, and come back with results. Thanks :)

I still don't know what's wrong with my system. I'm closing this as invalid for now, as it seems I'm the only getting this, and I'll give some more time to look into when I'm free.
Thanks everyone for the suggestions and help.

I noticed this as well. On macs everything is good, but my debian boxes consistently were misaligned.

It looks like the BSD csplit is a bit different from the GNU csplit in how it handles either empty files or leading the file with the thing you're splitting it with.

The pygment file starts off with the # DIVIDER header. GNU csplit by default will emit a 0 byte split file (code0000), where the BSD csplit will will start out with the #!/bin/sh in the code0000 file.