aaren / pandoc-reference-filter

internal referencing pandoc filter
41 stars 9 forks source link

Pandoc 1.16 breaks pandoc-reference-filter #20

Open bwhelm opened 8 years ago

bwhelm commented 8 years ago

The new version of pandoc (1.16) adds in attributes to images and links. This breaks pandoc-reference-filter (as well as pandocfilters).

I've fixed things in my fork of pandoc-reference-filter, though my fix presupposes all the other changes I've made to pandoc-reference-filter (and proposed to you via pull requests), as well as the obvious fix to pandocfilters (updating it so that Image and Link take 3 rather than 2 arguments, with the extra argument being the attributes). It is also worth noting that these changes require pandoc-1.16.

I'm not sure where you stand on those pull requests, but if you didn't want them, you could still look at how I fix things for pandoc-1.16 at https://github.com/bwhelm/pandoc-reference-filter/commit/2a95814382db6ab571f1a9c64b9df5d0c231c959; those changes would be relatively easy to adapt to the current master branch.

crmackay commented 8 years ago

@bwhelm, also 1.17 made some changes to latex references, but I haven't tested your branch with it yet.

maybe considering turning on issues on your branch? so people can comment and contribute there, as it appears more up-to-date?

bwhelm commented 8 years ago

Done. Comments there would be welcome.

aaren commented 8 years ago

Sorry I've been unresponsive on this repo recently. It's been a bit far down my priorities.

Things we could do going forward:

I've got some time this week so can work to bring this up to date. Let me know your thoughts on the rest.

crmackay commented 8 years ago

No worries. The beauty of git is its distributed so different people can bear the weight over time.

Since I didn't do any developing, and found it easy enough to just git clone the repos, I'll defer to you guys.

Thanks again to both of you for this super useful filter!

bwhelm commented 8 years ago

I'm not sure it's wise to give me commit rights. I don't have any formal training and so just hack away at things until I get something that seems to work well enough for me, but which can be buggy and problematic to maintain over time. It would be better to have someone more experienced judging when commits should be made. So my preference would be to have @aaren's be the go-to repository, and I will happily make pull requests for his review. That, of course, depends on whether @aaren wants to put in the time and effort.

For the moment, I continue to use this filter regularly. While there aren't any other features I foresee adding to it, I would intend to ensure that it continues working for my needs.

aaren commented 8 years ago

@bwhelm, understood :). Here's what I'll try and do then:

  1. Merge your outstanding PRs (except maybe tables, that needs more thought)
  2. Update the filter to work with latest pandoc (1.17).
  3. Add automated testing with Travis (already in master). This will let us see whether any new pull requests break the filter or not.

As I'm not using the filter as much now I'm leaning towards minimal adding of features in future, unless they are well tested. (3) should help with this. I'd like to make sure the core functionality stays pretty much as it is.

bwhelm commented 8 years ago

Sorry it's been a while. I'll follow up on other issues shortly (I hope!). I have one question before I do that.

I've just started playing around with panflute rather than pandocfilters. (See discussion on the pandoc list here.) It provides a much easier way of doing some things (including using pandoc to convert from markdown to json internally) and is much cleaner overall. It should make maintenance easier.

I know @aaren is not using this filter much any more and so may not have any incentive to switch over. But I thought I'd ask: would it be worthwhile converting from pandocfilters to panflute? (If so, I'd have to think about order: whether convert first and then apply my patches, or vice versa.) Any thoughts?

crmackay commented 8 years ago

Sorry for the delayed response. I think i would make sense to move over to panflute if JGM is going to favor panflute library over pandocfilters, going forward...

bwhelm commented 8 years ago

Having now experimented with panflute on my pandoc-comment-filter filter, I've decided it's not worth it for my purposes. While it is undeniably more convenient and intuitive, it is also about twice as slow -- on the order of 14 seconds rather than 7.5 seconds to process a 110,000-word document. So I think it's not worth making the switch here either.

psavery commented 7 years ago

Is this program still being worked on? I'd love to see this issue fixed.

aaren commented 7 years ago

@psavery despite my promises above I've had very little bandwidth to work on this. I can recommend https://github.com/lierdakil/pandoc-crossref which seems pretty full featured now.