diff --git a/src/lib/default-transformer.js b/src/lib/default-transformer.js index 8b25fe6..deab03d 100644 --- a/src/lib/default-transformer.js +++ b/src/lib/default-transformer.js @@ -20,9 +20,9 @@ export default function(input, {project, baseURI}) { // subjects in a specific project : @owner-slug/project-slug^subject_id // \b[\w-]+\b is hyphen boundary for slugs - .replace(/@(\b[\w-]+\b)\/(\b[\w-]+\b)\^([0-9]+)/g, `$1/$2 - Subject $3`) + .replace(/@(\b[\w-]+\b)\/(\b[\w-]+\b)\^S([0-9]+)/g, `$1/$2 - Subject $3`) - .replace(/\^([0-9]+)/g, function(_, subjectID) { + .replace(/\^S([0-9]+)/g, function(_, subjectID) { if (owner && name) { return `${owner}/${name} - Subject ${subjectID}`; } diff --git a/test/lib/default-transformer-test.js b/test/lib/default-transformer-test.js index 2fdb58a..32ce411 100644 --- a/test/lib/default-transformer-test.js +++ b/test/lib/default-transformer-test.js @@ -25,19 +25,19 @@ describe('default-transformer', () => { expect(htmlTagLink).to.equal(`
#good \n https://www.zooniverse.org/#/talk/17/1403?page=1&comment=3063
`); }); - it('replaces ^subject mentions with subject links', () =>{ + it('replaces ^S