TriviaMD 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea7d8b0baa803ab62daaf63ac882c723e13ee9b2e7eb6a8558997516d2290093
4
- data.tar.gz: 3601c0ae381b8b9ad0f0a04404094b371afa2f45e32449ce0035500390463df0
3
+ metadata.gz: 7c3b042230b7218be57af4349eb5f5c733eca5fa2e43011e5ab02ead83147d6b
4
+ data.tar.gz: '028e3233cbbcd451fed7c4fa42ff045d73aa95490bfdb169e25b8822ca5d5e78'
5
5
  SHA512:
6
- metadata.gz: c988e5b9a698b8477a4b276ac84853131a7cd9e261d3131405ed6dab8902c0533c16340ac1728144560d6c6d3bcaefa21035fa4a53e5c4330a331d0945e53f47
7
- data.tar.gz: f1c9ff7f1cddbc94885dd402f90e02facb6e8aa76d08031689dc86669a6bd2ea6adbf37af4ac8b3cbd0eef94bb761afc26d8addc9767e311f335b0daee1bed03
6
+ metadata.gz: 8b72e80621bc7826f53b59d354ac09e5c66859c4f82db4295691955f5f80115c2694ba9e553c64fdbe6f68123c2dafc508b44f5e2a732ac69b637c2e21339724
7
+ data.tar.gz: 22de231eea88b58636967ed3e40fa51c8ceb0c851faf67f6671d44b8a66da07279586641f21e958826cf8ba7657de21f981c85ecf18f2ab2faf282bacabf824d
data/lib/quizzes_v1.rb CHANGED
@@ -40,6 +40,7 @@ class QuizzesV1
40
40
  question_text: question["question"],
41
41
  question_type: "multiple_answers_question",
42
42
  neutral_comments: question["reason"],
43
+ neutral_comments_html: question["reason"],
43
44
  points_possible: 1
44
45
  }
45
46
  }
data/lib/trivia_parser.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'kramdown'
2
2
 
3
3
  class TriviaParser
4
+ include Kramdown::Utils::Html
4
5
  def initialize(file, debug = false)
5
6
  @file = file
6
7
  @debug = debug
@@ -9,7 +10,7 @@ class TriviaParser
9
10
  def get_event(c)
10
11
  return { type: :event_trivia_header } if c.type == :header && c.options[:level] == 2 && c.options[:raw_text] == "Trivia"
11
12
  return { type: :event_header } if c.type == :header
12
- return { type: :event_reason, payload: { reason: c.children.first.value } } if c.type == :p && c.children.first.type == :codespan
13
+ return { type: :event_reason, payload: { reason: escape_html(c.children.first.value) } } if c.type == :p && c.children.first.type == :codespan
13
14
  return { type: :event_answers, payload: { answers: parse_answers(c) } } if c.type == :ul
14
15
  return { type: :event_question, payload: { question: c.children.first.children.first.value } } if c.type == :blockquote
15
16
  return { type: :no_event }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TriviaMD
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bence Pjatacsuk