rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.34k stars 741 forks source link

Add a parser for Scilab language #1913

Open vincentcouvert opened 1 year ago

vincentcouvert commented 1 year ago

Hi all, Please find below information related to the development of a Scilab parser in Rouge. Best regards.

The name of the language Scilab: https://www.scilab.org/ Online help: https://help.scilab.org/

Implementation in other libraries Pygments: https://pygments.org/docs/lexers/#pygments.lexers.matlab.ScilabLexer Chroma: https://github.com/alecthomas/chroma/blob/master/lexers/embedded/scilab.xml Highlight: https://github.com/highlightjs/highlight.js/blob/main/src/languages/scilab.js

Additional context GitLab uses Rouge to detect language used in files and GitLab is now the official Scilab development platform. Having this feature in Rouge would simplify the reading of Scilab code in repository, issues, wiki, ...

vincentcouvert commented 1 year ago

Reference issue on GitLab side: https://gitlab.com/gitlab-org/gitlab/-/issues/377795

vincentcouvert commented 1 year ago

Reference issue on Scilab side: https://gitlab.com/scilab/scilab/-/issues/16895

y377 commented 1 year ago
{% highlight ruby linenos %}
def foo
  puts 'foo'
end
{% endhighlight %}
vincentcouvert commented 1 year ago

@y377 what do you mean?

y377 commented 1 year ago

Sorry, I just want to try code highlighting, it turns out that GitHub does not support this way of defining code blocks

image Do you support this way of defining code blocks? Because it is very convenient to write in the markdown editor, because it is suitable for non-code developers to use!

vincentcouvert commented 1 year ago

@y377 I think your question is not related to this issue (which is about Scilab language support).

vincentcouvert commented 1 year ago

See corresponding PR : https://github.com/rouge-ruby/rouge/pull/1916