openjournals / whedon-api

A small service that provides the basic Whedon API
MIT License
6 stars 14 forks source link

Tilde (~) gets converted into space by Whedon when producing Crossref outputs #122

Open arfon opened 4 years ago

arfon commented 4 years ago

It looks like ~ in reference URLs are being converted into a space by Whedon. See this Crossref output as an example: https://github.com/openjournals/joss-papers/blob/866dc2bbc88446006e7864331834b7514cda1b17/joss.02685/10.21105.joss.02685.crossref.xml#L104

/ cx https://github.com/openjournals/joss-reviews/issues/2685

xuanxu commented 4 years ago

Note: this is caused by the :latexfilter applied when opening/parsing the bibliography https://github.com/openjournals/whedon/blob/master/lib/whedon/bibtex_parser.rb#L20

> require 'latex/decode'
 => true 
> LaTeX.decode "https://web.cs.ucdavis.edu/~matloff/matloff/public_html/156/PLN/DESimIntro.pdf"
 => "https://web.cs.ucdavis.edu/ matloff/matloff/public_html/156/PLN/DESimIntro.pdf"