You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search usually works fine but for some search terms it fails and there are no results nor error messages on the page. For example, search for char
The JavaScript console shows this error:
lunr.min.js:7 Uncaught TypeError: Cannot read property 'tf' of undefined
at t.Index.documentVector (lunr.min.js:7)
at t.Index.<anonymous> (lunr.min.js:7)
at Array.map (<anonymous>)
at t.SortedSet.map (lunr.min.js:7)
at t.Index.search (lunr.min.js:7)
at LunrSearchEngine.search (search-lunr.js:34)
at Object.query (search-engine.js:31)
at launchSearch (search.js:79)
at handleUpdate (search.js:121)
at HTMLInputElement.<anonymous> (search.js:142)
According to olivernn/lunr.js#243 this might be caused by lunr.js having issues with unicode codepoints like emojis. There is an emoji (🔮) in the book on both pages about char and string literals and it fails to search for any terms that appear on one of these pages. I am not 100% sure about it, but this looks like strong evidence.
This failure should be fixed in lunar.js but until then, we should try to find a workaround for Crystal Book.
I think we could just remove the emojis from the pages. It's nice to have them there but they're not essential. Perhaps we could also manually remove them from the search index.
The text was updated successfully, but these errors were encountered:
Lunr.js can't handle emojis in the search index, this workaround encodes the emoji as html numerical character reference.
Unfortunately this woni't work inside fenced code blocks.
See crystal-lang#127 for details.
Lunr.js can't handle emojis in the search index, this workaround encodes the emoji as html numerical character reference.
Unfortunately this woni't work inside fenced code blocks.
See #127 for details.
Search usually works fine but for some search terms it fails and there are no results nor error messages on the page. For example, search for
char
The JavaScript console shows this error:
According to olivernn/lunr.js#243 this might be caused by lunr.js having issues with unicode codepoints like emojis. There is an emoji (🔮) in the book on both pages about char and string literals and it fails to search for any terms that appear on one of these pages. I am not 100% sure about it, but this looks like strong evidence.
This failure should be fixed in lunar.js but until then, we should try to find a workaround for Crystal Book.
I think we could just remove the emojis from the pages. It's nice to have them there but they're not essential. Perhaps we could also manually remove them from the search index.
The text was updated successfully, but these errors were encountered: