validate math arxiv IDs
@@ -24,6 +24,7 @@ const s2paperId = Joi.string().pattern(/[a-f0-9]{40}/);
* https://arxiv.org/help/arxiv_identifier.
*/
const currentArxivFormat = Joi.string().pattern(/arxiv:[0-9]{2}[0-9]{2}.[0-9]+(v[0-9]+)?/);
+const arxivMathFormat = Joi.string().pattern(/arxiv:math\/[0-9]{5,}(v[0-9]+)/);
const olderArxivFormat = Joi.string().pattern(
/arxiv:[a-zA-Z0-9-]+\.[A-Z]{2}\/[0-9]{2}[0-9]{2}[0-9]+(v[0-9]+)/
);
@@ -32,6 +33,7 @@ export const paperSelector = Joi.object({
paperSelector: Joi.alternatives().try(
s2paperId,
currentArxivFormat,
+ arxivMathFormat,
olderArxivFormat,
)
});
