Skip to content
Browse files

aaron FTW!

  • Loading branch information...
1 parent 5d908c6 commit b9763a7426c21bb9f327808c8b26d2d91182e6aa @nakajima committed Dec 17, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/syntaxily.rb
View
4 lib/syntaxily.rb
@@ -11,7 +11,7 @@ module Syntaxily
class LexerNotFound < StandardError; end
def self.parse(text)
- doc = Nokogiri::HTML.parse("<root>" + text + "</root>")
+ doc = Nokogiri::HTML.fragment(text)
doc.search('pre.code').each do |node|
lexer = node['rel']
begin
@@ -21,7 +21,7 @@ def self.parse(text)
next
end
end
- doc.at('root').inner_html
+ doc.to_html
end
def self.available_lexers

0 comments on commit b9763a7

Please sign in to comment.
Something went wrong with that request. Please try again.