Not sure it's a bug or not in search function.



  • we're using markdown, and we just simply store markdown content into db.

    It's correct, but the redundant character or words will disturb searching.

    I just posted a new one to test category without any words about javascript, but there's a snippet decorated within ````javascript```` then I can get this topic when submit javascript
    1.png

    More interesting is when you submit smile

    the page is full of 😄



  • I'm guessing this is a feature? If you view the html source of that post, do you see the string "JavaScript" in it anywhere? I'm guessing the source code parser adds additional tags to the source code, and as you said you are storing the post as markdown so it's still included. I'm sure this could be prevented with a regular expression included in the search source code.



  • @Joel-Murphy
    yes, you're right, the source code contains javascript in order to make highlighter render snippet correctly.

    And I just add a filter to convert markdown to HTML, then use jquery.text() to get the plan text.

    And index the plan text into search finally.


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.