zooniverse / shakespeares_world

Full text transcription project for the Folger Shakespeare Library
https://www.shakespearesworld.org
Other
8 stars 5 forks source link

Luna (catalogue) links on Talk not working #276

Open VVH opened 8 years ago

VVH commented 8 years ago

Links from images to the Folger catalogue (viewable under 'i' icon in the metadata on Talk) are not working.The links work fine in the transcription interface, but not from Talk. I think @camallen and @brian-c might know what's up, but flagging @simoneduca as well. screen shot 2016-01-04 at 16 21 33

camallen commented 8 years ago

@simoneduca you fixed this in the project right?

simoneduca commented 8 years ago

@camallen that rings a bell, but I think it was a PFE problem, not of SW. Something to do with a html parser rendering ~ as superscript. Let me check.

brian-c commented 8 years ago

This is the markdown-it automatic linker conflicting with the subscript syntax (~) plugin. I wonder if it can be fixed by messing with the plugin's activation order.

simoneduca commented 8 years ago

@brian-c I can have a look if you point me to the right code bit :)

brian-c commented 8 years ago

Here's where the plugin is being included:

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

Looks like auto-linking is built-in (not a plugin) though, so there might not be a way to change the order these things happen in.

Might be worth checking if https://github.com/markdown-it/markdown-it-sub would accept a PR, or if it can be fixed in https://github.com/markdown-it/markdown-it

simoneduca commented 8 years ago

what's the markdown-it-sub plugin needed for?

brian-c commented 8 years ago

That just allows people to mark text as subscript.

VVH commented 8 years ago

Hey guys, where did we get on this? If it's not fixable in PFE I will ask Folger to give us differently formatted links for the next batch of data. @simoneduca @brian-c?

simoneduca commented 8 years ago

@VVH if they could reformat the links, that'd be much easier.

camallen commented 8 years ago

@simoneduca, is a url like with ~ the problem, e.g. http://example.com/~/images/test.png the problem?

simoneduca commented 8 years ago

yep.

camallen commented 8 years ago

right - that seems like something we should support by default.