Fix a minor bug with snippet pages

Not displaying explanation.
This commit is contained in:
Angelos Chalaris
2019-08-19 10:45:34 +03:00
parent 0260876974
commit 3ed60da1cd

View File

@ -17,7 +17,9 @@ const getTextualContent = (str, noExplain = false) => {
results.push(match);
});
}
return results[1].slice(0, results[1].lastIndexOf('<p>'));
if (noExplain)
return results[1].slice(0, results[1].lastIndexOf('<p>'));
return results[1];
};
// Gets the code blocks in a gatsby page