History

Add SQL code highlighting in PostgreSQL documentation

Thibaut Courouble committed 10 years ago

Commit ca2d6821 parent 0b914903 files · +27 −1Browse files

Showing the changes to lib (1 of 3 files). Show all

Unified · Split

lib/docs/filters/postgresql/clean_html.rb+8−0
@@ -42,6 +42,14 @@ module Docs · 41 unmodified lines
42 node.name = 'pre'42 node.name = 'pre'
43 node.content = node.content43 node.content = node.content
44 end44 end
45
46 css('pre code', 'pre span').each do |node|
47 node.before(node.children).remove
48 end
49
50 css('pre.SYNOPSIS', 'pre.PROGRAMLISTING').each do |node|
51 node['data-language'] = 'sql'
52 end
45 end53 end
46 end54 end
47 end55 end