History

gcc: enable syntax highlighting

Simon Legner committed 7 years ago

Commit 651f20a1 parent d39f0dc2 files · +13 −1Browse files

Unified · Split

2 files
  1. lib/docs/filters/gcc/clean_html.rb +12 −0
  2. lib/docs/scrapers/gnu/gcc.rb +1 −1
lib/docs/filters/gcc/clean_html.rb+12−0
@@ -0,0 +1,12 @@
1module Docs
2 class Gcc
3 class CleanHtmlFilter < Filter
4 def call
5 css('pre').each do |node|
6 node['data-language'] = 'cpp'
7 end
8 doc
9 end
10 end
11 end
12end
lib/docs/scrapers/gnu/gcc.rb+1−1
@@ -6,7 +6,7 @@ module Docs · 5 unmodified lines
6 home: 'https://gcc.gnu.org/'6 home: 'https://gcc.gnu.org/'
7 }7 }
8 8
9 html_filters.push 'title'9 html_filters.push 'gcc/clean_html', 'title'
10 10
11 options[:root_title] = false11 options[:root_title] = false
12 options[:title] = false12 options[:title] = false

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t