Module: GithubToCanvasQuiz::Parser::Markdown::Helpers::NodeParser
- Included in:
- Answer::Base, Question, Quiz
- Defined in:
- lib/github_to_canvas_quiz/parser/markdown/helpers/node_parser.rb
Instance Method Summary collapse
Instance Method Details
#parse_text_from_node(node) ⇒ Object
14 15 16 |
# File 'lib/github_to_canvas_quiz/parser/markdown/helpers/node_parser.rb', line 14 def parse_text_from_node(node) CGI.unescapeHTML(node.content).strip end |
#parse_text_from_nodes(nodes, selector) ⇒ Object
8 9 10 11 12 |
# File 'lib/github_to_canvas_quiz/parser/markdown/helpers/node_parser.rb', line 8 def parse_text_from_nodes(nodes, selector) nodes.css(selector).map do |node| parse_text_from_node(node) end end |