lib/mdv/markdown_viewer.rb in mdv-0.1.7 vs lib/mdv/markdown_viewer.rb in mdv-0.2.0

- old
+ new

@@ -1,7 +1,7 @@ require 'gir_ffi-gtk3' -GirFFI.setup :WebKit, '3.0' +GirFFI.setup :WebKit2, '4.0' module MDV # Markdown viewer window class class MarkdownViewer attr_reader :file @@ -53,11 +53,11 @@ it.add web_view end end def web_view - @wv ||= WebKit::WebView.new + @wv ||= WebKit2::WebView.new end def fullpath @fullpath ||= File.expand_path(file, Dir.pwd) end @@ -69,9 +69,9 @@ def html GitHub::Markup.render(fullpath) end def reload - web_view.load_string html, nil, nil, base_uri + web_view.load_html html, base_uri end end end