NodeBB/nodebb-plugin-markdown

How to add new languages in this plugin?

lslzl3000 opened this issue · 10 comments

need more different type of codes, how to add new tags/languages?

By the way, how to add language support for line numbers?
Should add line numbers for ts/typescript

You can add new language support by adding the translated language keys into the public/languages folder

pitaj commented

Do you mean programming languages for code highlighting or translations from English? I believe you can enable line numbers in the ACP settings for this plugin.

I mean coding language, add new custom language definition

And for line numbers options, there are only 23 options in ACP settings, no 'typescript', so is there an option to add new languages in ACP?

pitaj commented

The JavaScript highlighting should work fine for typescript.

The JavaScript highlighting should work fine for typescript.

highlight is fine but no line numbers for ts
or do you mean using js tag for ts?

Can we enable line numbers for all 180+ languages from hightlights?

No, that'd be an insane amount and increase the payload size of the minfile significantly... But I will take some languages into account.

v11.1.0

image

tl;dr

  • Yeah you can now support all 180+ languages from highlightjs
  • ts is actually already highlighted

It occurs to me your complaint was regarding enabling line numbers for TS, so that is now in #216.