added syntax check to search for code snippets