소스 검색

Update Electron documentation (20.0.0)

Simon Legner 3 년 전
부모
커밋
3947238526
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      lib/docs/filters/electron/clean_html.rb

+ 5 - 0
lib/docs/filters/electron/clean_html.rb

@@ -12,6 +12,11 @@ module Docs
 
         css("footer").remove
 
+        css('pre').each do |node|
+          node.content = node.css('.token-line').map(&:content).join("\n")
+          node['data-language'] = 'javascript'
+        end
+
         doc
       end
     end