Single author, multiple resources single year: problem.

Hi guys,
I have managed to change a csl citation style to fit my specific needs. It was done a few years ago with a lot of trial and error. It worked with little problems in a few assignments I had. Unfortunately a new problem developed recently and I do not know CSL well enough to find the error. When I have more than two references for the same author in the same year, my third, fifth etc. resources are not referenced correctly.

i.e. it should be smith, 2010a Smith, 2010b, smith 2010c etc.

I created a few dummy resources to test this and if there is only two, it works i.e.
(test, 2016a:100), (test, 2016b:23)
(Best, 2015a:12), (Best, 2015b:12)

The moment I add a third or more resources for the same author in the same year it stops working.i.e.
(test, 2016a:100), (test, 2016b:23), (test, 2016:22)
(Best, 2015a:12), (Best, 2015b:12), (Best, 2015:12)

The date of the third resource onward loses its letter in both the inline citation and the bibliography.

In both examples above, the last citation is the third one added. I would be grateful is someone could check my code. I believe there is a lot more errors in my code, but this is the only one that is rearing its head. Thanks in advance.

My code can be found here
https://gist.github.com/anonymous/2eb355b325df4f235312b02a0677ee7a
Sign In or Register to comment.