Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect matches #11

Closed
parrish opened this issue Aug 14, 2015 · 8 comments · Fixed by #13
Closed

Incorrect matches #11

parrish opened this issue Aug 14, 2015 · 8 comments · Fixed by #13

Comments

@parrish
Copy link
Contributor

parrish commented Aug 14, 2015

https://github.com/zooniverse-ui/markdownz/blob/master/src/components/markdown.js#L44

https://github.com/zooniverse-ui/markdownz/blob/master/src/components/markdown.js#L46

Talk does not match subject mentions like this. The syntax for matching a subject is ^S<id>, e.g. ^S123.

Likewise collection mentions are ^C<id>.

The best way to handle this in terms of front-end links would probably be to add a redirect route at /talk/subjects/:id that looks up the project slug and redirects to the project route.

@aweiksnar aweiksnar self-assigned this Aug 14, 2015
@edpaget
Copy link
Contributor

edpaget commented Aug 14, 2015

Is this going to change anything that was using the old ^123 to match subject id 123?

@parrish
Copy link
Contributor Author

parrish commented Aug 14, 2015

The syntax in older versions of talk was just the zooniverse id (AGZ0000001). New talk has never matched without the type prefix (otherwise you can't disambiguate the thing you're mentioning).

@edpaget
Copy link
Contributor

edpaget commented Aug 14, 2015

As far I know new Talk has always matched subjects without an S prefix. In project specific Talks it can match the subject without a qualified project.

@parrish
Copy link
Contributor Author

parrish commented Aug 14, 2015

Nope. It's never even been used in new talk.

@parrish
Copy link
Contributor Author

parrish commented Aug 14, 2015

@edpaget
Copy link
Contributor

edpaget commented Aug 14, 2015

Yeah that's different than the help text on the Front-End, which is what I presume everyone has been using so far: https://github.com/zooniverse/Panoptes-Front-End/blob/master/app/talk/comment-help.cjsx#L11

In addition to being different than what the Front-End markdown parsers has been using, so if we change it, existing in markdown links to subjects will be broken.

@parrish
Copy link
Contributor Author

parrish commented Aug 14, 2015

I guess that help text has always been wrong then. It doesn't look like anybody has mentioned a subject with either syntax at all. If they had, I'd just migrate it.

@edpaget
Copy link
Contributor

edpaget commented Aug 14, 2015

Well then no big deal either way.

aweiksnar added a commit that referenced this issue Aug 20, 2015
- Adds a prefix 'S' character for subject mentions
- closes #11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants