kba / hocr-spec

The hOCR Embedded OCR Workflow and Output Format
http://kba.github.io/hocr-spec/1.2/
73 stars 20 forks source link

Move a paragraph to ocr_carea section #48

Closed amitdo closed 8 years ago

amitdo commented 8 years ago

I don't know why my commit changed some styles in the generated html doc.

I used the web service this time.

zuphilip commented 8 years ago

I had a similar experience by using the webservice. I solved it by only partially add the changes and don't commit the style changes, i.e. I used a graphical version of git add -p.

amitdo commented 8 years ago

Is it OK to force push to this branch?

zuphilip commented 8 years ago

It should be okay IMO to force push in your branch here, which is not the master branch. Alternatively you can push to a new branch and open another PR.

amitdo commented 8 years ago

I created a new branch and forced pushed it on top of this PR.

This time I used the local bikeshed. Again, my commit changed some styles in the generated html doc. I don't think it's a good idea to change the generated code manually.

@kba?

kba commented 8 years ago

Yeah, I think that has to do with different versions of pygments generating different syntax highlighting. It is certainly annoying, but not a real problem until you hit conflicts.

The only solution I see is to stop using Github Pages from the master branch but from a separate gh-pages branch, not checking in the bikeshed results. gh-pages must then regularly merge master and commit the results, which is a manual process and can produce the same instabilities.

I'll investigate if it's really just pygments and if it is, how we can replace that with client-side rendering like prismjs.

kba commented 8 years ago

Wait, you need to update bikeshed, the differences with the underscores is due to https://github.com/tabatkins/bikeshed/issues/826

amitdo commented 8 years ago

Thanks for fixing and merging.

Should I update bikeshed every time before I commit?

kba commented 8 years ago

No, bikeshed doesn't change noticeably all the time, https://github.com/tabatkins/bikeshed/issues/826 was specifically adressing an issue with hocr-spec. I just forgot to give you a heads-up to update, my bad.

The issue about pygments (syntax highlighting classes changing between invocations) is weird though, I will propose something upstream.

If you want to be sure to use the consistent and up-to-date version, you can also force the backend: make BIKESHED=curl to use the web interface (which is always using the upstream master + up-to-date templates). Or make BIKESHED=docker to use the docker container.

kba commented 8 years ago

The issue with pygments is due to a change in march 2015, so the output will differ depending on whether you're using pygments >= 2.1 or <= 2.0.1. The docker image has an old version, Debian has an old version, the web service has a new version and so does probably Ubuntu.

amitdo commented 8 years ago

I installed it via pip. The version is 2.1.3. I can downgrade if that will help.

kba commented 8 years ago

No, no, I'll update my boxes and docker container :) This just really bugged me so I looked through the pygments commit history until I found the culprit commit and thought I'd share.