summaryrefslogtreecommitdiff
path: root/lib/gitlab/gfm/ast/parser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/gfm/ast/parser.rb')
-rw-r--r--lib/gitlab/gfm/ast/parser.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/gitlab/gfm/ast/parser.rb b/lib/gitlab/gfm/ast/parser.rb
index 217856188ee..db1bff320b0 100644
--- a/lib/gitlab/gfm/ast/parser.rb
+++ b/lib/gitlab/gfm/ast/parser.rb
@@ -2,16 +2,11 @@ module Gitlab
module Gfm
module Ast
class Parser
- attr_reader :tree
+ attr_reader :tree, :text
def initialize(text)
@text = text
- @lexer = Lexer.new(@text, [Syntax::Content])
- @nodes = @lexer.process!
- end
-
- def tree
- @nodes.first
+ @tree = Lexer.single(text, Syntax::Content)
end
def recreate