Questions tagged [rouge]

Rouge is an elegant, extendable code highlighter written in pure Ruby.

Rouge supports 72 languages and counting, including Ruby, JavaScript, Swift, Go, C++, and Haskell.

Rouge aims for the highest quality lexing in all its supported languages, even with strange features and odd corner cases.

Rouge themes are 100% compatible with Pygments' stylesheets. No need to remake your theme, and no need to spawn a Python process either. Rouge is made in Ruby

Find more at http://rouge.jneen.net/.

81 questions
1
vote
1 answer

Jekyll code block size in header is too small

The code block font size is too small on my website when it appears in Heading 1 lines. When typing a code block in a header in Stack Exchange we seem to have no problem. For example, when I type the following on this website: # `multi-timer` bash…
WinEunuuchs2Unix
  • 1,801
  • 1
  • 17
  • 34
1
vote
0 answers

Jekyll Rouge washed out Monokai color

I'm using Github Pages Jekyll static website generator with Cayman theme on Rouge Monokai syntax highlighting on my website. I used the instructions from this answer. I copied the scss from:…
WinEunuuchs2Unix
  • 1,801
  • 1
  • 17
  • 34
1
vote
0 answers

GitLab specific Syntax Highlighting Options

I'm trying to specify an option that is defined in the LUA lexer library that GitLab uses (ruby library Rouge). option :function_highlighting, 'Whether to highlight builtin functions (default: true)' In the .gitattributes file at the root of my…
timetear
  • 167
  • 1
  • 1
  • 8
1
vote
2 answers

Rouge Score Append A List

I have a text summarization project. In this project, I ensure that hundreds of texts are summarized in order. I also get the Rouge scores of these summaries. However, I have to keep the Rouge scores on the list before I can produce statistics. I…
Sdeveci
  • 11
  • 2
  • 3
1
vote
1 answer

Rouge Syntax Highlighting in GitHub Pages

I have been using Rouge and Kramdown to properly format syntax since I've been using Jekyll. I haven't looked in awhile, but recently noticed that the syntax highlighting doesn't appear to be working properly. I noticed that the change broke when…
Jason N. Gaylord
  • 7,910
  • 15
  • 56
  • 95
1
vote
2 answers

Horizontal scrollbar for fenced code blocks in Jekyll

How can I enable horizontal scrollbar for my fenced code blocks in jekyll using kramdown and rouge? Is there any parameter I could add to my _config.yml file maybe? Essentially I want to mimic the code blocks from GitHub as shown below But this is…
ThanosFisherman
  • 5,626
  • 12
  • 38
  • 63
1
vote
1 answer

Jekyll syntax highlighting not producing correct markup

My local environment isn't compiling my Jekyll site with the correct markup for Rouge syntax highlighting. So for something like {% highlight javascript %} {% endhighlight %} the markup I get after…
Arran
  • 21
  • 2
1
vote
1 answer

Rouge gem not showing line breaks in formatted code?

I have followed minimal examples using the rouge gem here (i.e. the documentation), as well as here and here. Everything working, except that line breaks in the code aren't appearing. To be explicit, code like this def plus_two(x) x + 2 end has…
stevec
  • 41,291
  • 27
  • 223
  • 311
1
vote
1 answer

Jekyll/Rouge - highlighted code blocks nested

I have switched from github pages to hosting my own site. As a result of this migration I got the syntax highlighting blocs to be nested.
        
TheMeaningfulEngineer
  • 15,679
  • 27
  • 85
  • 143
1
vote
1 answer

Can I use GitHub's Linguist as a replacement to Rouge in Jekyll

I want to improve syntax highlighting on my blog written in Jekyll. I've noticed that some languages (e.g. Scala) are not always correctly highlighted by Rouge (it performs wrong tokenization). In the same time GitHub's code examples and Gists are…
Mateusz Kubuszok
  • 24,995
  • 4
  • 42
  • 64
1
vote
0 answers

Github pages Modelica language syntax highlighting not working

I tried a simple test in Github pages to be able to include Modelica language but the highlight does not work on github pages whereas it is working in github markdown rendering Working here…
Gautier Bureau
  • 183
  • 1
  • 1
  • 9
1
vote
0 answers

Use ERB block as a literal in Rouge syntax highlighting

I'm trying to setup Rouge for my Rails app and I'm having issues with passing in inline ERB strings or blocks. When it reads ERB from a file it works fine however. Here is an example of what I have - Works rouge_helper.rb def rouge(file, language) …
Ryan Grush
  • 2,076
  • 3
  • 37
  • 64
1
vote
3 answers

pyrouge: __init__() got an unexpected keyword argument 'n_words'

i'm trying to install pyrouge, and i ran this code (following this repo) from pyrouge import Rouge155 from pprint import pprint ref_texts = {'A': "Poor nations pressurise developed countries into granting trade subsidies.", 'B':…
Bily
  • 51
  • 9
1
vote
1 answer

Wrapping a listing containing formatted spans

I have an HTML tag which contains may tags with color CSS styling, generated by Ruby's Rouge syntax highlighting engine. A is used because the markup contains whitespace which must be rendered. I'm having trouble getting…
Aaron Christiansen
  • 11,584
  • 5
  • 52
  • 78
1
vote
1 answer

show line numbers without changing code blocks style in jekyll

I am making a jekyll3 blog, and I am trying to use a Syntax highlighter (adding code blocks, I am using highlighter: rouge markdown: kramdown Since they are supported by github pages. This is syntax.scss, Note: I am trying to limit it's height and…
Atef Hares
  • 4,715
  • 3
  • 29
  • 61