Zotero Style Repository - searching styles with diacritics

There are quite a few CSL styles with diacritics in the title, e.g. http://www.zotero.org/styles/georg-august-universitat-gottingen-institut-fur-ethnologie-und-ethnologische-sammlung

Currently, the search string in the Zotero Style Repository is matched against both the style title and filename (sans ".csl" extension). I decided a while back to just drop diacritics in style filenames (e.g. "für" becomes "fur" instead of "fuer").

I think we could improve the search by replacing spaces in the search string by hyphens when comparing it to the filenames (which will never contain spaces). One clear benefit is that e.g. the string "Universitat Gottingen" will then match "universitat-gottingen".

See https://github.com/citation-style-language/utilities/commit/24b4b5e5ac6b7fa5e2aa5fb19b2c3e401b3c8a2b for a diff.
  • The better fix here is to just split the search string on spaces and require all words.
  • That's fine with me too, if there isn't too much of a performance hit. (the page is already a bit slow)
  • The better fix here is to just split the search string on spaces and require all words.
    Do you think that that would result in a significant performance hit? My proposal consists of a single find-and-replace per search string, which shouldn't affect search speed.
  • Do you think that that would result in a significant performance hit?
    Nope. Done.

    I also managed to speed up page load by quite a lot.
  • Awesome, thanks!
Sign In or Register to comment.