nim-lang / nimforum

Lightweight alternative to Discourse written in Nim
https://forum.nim-lang.org/
MIT License
763 stars 70 forks source link

Search gives raw text #150

Open CodeDoes opened 6 years ago

CodeDoes commented 6 years ago

https://forum.nim-lang.org/search?q=nimscript The problem can be found in the first result

[Arrrrrrrrr]
Defining variable in nim.cfg
Arrrrrrrrr
Mar 13

It is worth to check out nimscript too:

https://nim-lang.org/docs/nims.html

https://nim-lang.org/docs/**nimscript**.html

Notice the formatting around nimscript. If you click on the link it also sends you to the wrong url.

dom96 commented 6 years ago

Yes, the problem is that search results can give partial text so you might have:

...foo** blah blah

And then the RST parser complains because the ** doesn't end. Because of this the search results might have raw text in them sometimes.

This case is a bit different though. I think the search results should use a different delimiter and then replace it with <b> manually instead of using **.