Autolink for Discourse broken for revised IDs

Recently @vimala changed a few IDs, including for patthana and Itivuttaka,. However, @blake these are not working as autolinks here on Discourse. Hopefully it should be easier to recognize “Iti” than “It”!

I did not change the Itivuttaka. It was already marked as iti. I will have a look at the discourse autolinks and change them if needed.

In the autolinks, Itivuttaka was indeed marked wrongly as “it” so I changed that now but the patthana I had already changed, as well as the sht links and Sarvastivada as “sarv”. So I do not know why patthana would not be working.

Thanks Ayya. Sorry, I wrote hastily in my first message. Actually, the only one I tested was Iti, so I’m not sure about the others. But Iti doesn’t seem to be working: eg. Iti 25

The change might take a little while to get through. But I have the feeling they are all not working so that would have to have something to do with the interaction between js and ruby.
@Blake - how does the autolink.js interact with discourse?

Not sure what you’re looking at. The code responsible is in the suttacentral-discourse-plugin in a file called suttacentral.js.
Anyway i updated the plugin and now iti and patthana should be recognized - no change needed for sarv or sht, the code just looks at the prefix of a “word with numbers” to decide if it’s a uid, like if it sees something starting with “lzh-s” or “skt-s” it reckons that must be a uid and marks it up as such (meaning it’ll readily make false positives if you enter non-existing sutta-ish uids). If the SuttaCentral server then responds with a 404 type response it quietly un-marks up the link. So recognition of parts of longer uids requires no change if the start of the uid (generally first 3 characters) remains the same, which is the case with sarv and sht.

I see. I was talking about: https://github.com/suttacentral/suttacentral/blob/master/static/js/discourse/autolink_sc.js

I will need to add a few more changes to that soon (Patna Dharmapada and Gandari Dharmapada).
I will also need to change “patthana” to “patthana1”, “patthana2”,etc. otherwise it will not work.