You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently internal links are partly broken by not using this function in all cases i believe:
/** * Decode a JATS internal identifier. * * This function normalizes an id so that it can not be confused with a URL. * This is necessary for issues such as [this](https://github.com/stencila/encoda/pull/399#issuecomment-580391161) * where a `rid` "looked like" a URL and so was treated as such. * The [`rid` (reference to an identifer)](https://jats.nlm.nih.gov/archiving/tag-library/1.1/attribute/rid.html) * attribute is intended to be used for internal identifiers within the document. */functiondecodeInternalId(id: string|null): string|undefined{if(id===null)returnundefinedreturnid.replace(/\./g,'-')}
Not sure what the best approach is, should all ids use decodeInternalId, use rids or is there another way to detect/prevent this problem? I'm not sure i fully understood the issue in the linked issue with confusing with a URL.
The text was updated successfully, but these errors were encountered:
Currently internal links are partly broken by not using this function in all cases i believe:
https://github.com/stencila/encoda/blob/master/src/codecs/jats/index.ts#L1654
I'm not sure how this should be handled, but right now only some ids get the replacement.
For example Figure ids are not changed.
It is possible to change internal links the same way while rendering:
Not sure what the best approach is, should all ids use
decodeInternalId
, userid
s or is there another way to detect/prevent this problem? I'm not sure i fully understood the issue in the linked issue with confusing with a URL.The text was updated successfully, but these errors were encountered: