nodebb-plugin-markdown 12.0.2 → 12.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-markdown",
3
- "version": "12.0.2",
3
+ "version": "12.0.3",
4
4
  "description": "A Markdown parser for NodeBB",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -311,7 +311,8 @@
311
311
  for(className of classIterator) {
312
312
  if (className.startsWith('language-')) {
313
313
  const language = className.split('-')[1];
314
- if (aliasMap.has(language) && config.markdown.highlightLinesLanguageList.includes(aliasMap.get(language))) {
314
+ const list = config.markdown.highlightLinesLanguageList;
315
+ if (aliasMap.has(language) && list && list.includes(aliasMap.get(language))) {
315
316
  $(block).attr('data-lines', 1);
316
317
  window.hljs.lineNumbersBlock(block);
317
318
  }