kalekundert / stepwise

Modular, command-line scientific protocols
GNU General Public License v3.0
3 stars 0 forks source link

Merge identical footnotes #56

Closed kalekundert closed 3 years ago

kalekundert commented 3 years ago

For example:

sw step Lorem. | sw note X | sw step Ipsum. | sw note X

Current output:

1. Lorem [1].

2. Ipsum [2].

Notes:
[1] X

[2] X

Expected output:

1. Lorem [1].

2. Ipsum [2].

Notes:
[1] X

The annoying thing is that this is handled correctly if all the footnotes are spcified in the same protocol, so my guess is that I need to have the top-level main function somwhoe re-evaluate the footnotes.

kalekundert commented 3 years ago

The problem is that the notes are de-duplicated when two protocols are merged, but sw note does not trigger a merge...