TriviaMD 0.1.5 → 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: 847f2e364b5b1118c064f21dfcc93f9038a1caa8b628e3bd594059def01bb6e3
4
- data.tar.gz: 695a7af4b76beb415b9ace4c026c5390a3d157a3ae7698a5e3d7ae69dd4c132d
3
+ metadata.gz: 7c3b042230b7218be57af4349eb5f5c733eca5fa2e43011e5ab02ead83147d6b
4
+ data.tar.gz: '028e3233cbbcd451fed7c4fa42ff045d73aa95490bfdb169e25b8822ca5d5e78'
5
5
  SHA512:
6
- metadata.gz: 29dd27234614d21c20b59c6053d8f7712412326b9f92c3f4947cbd75f283b63a5ed12a0bbc3cd21292ab1e6baa8291948794f5028109c734583486644b3991aa
7
- data.tar.gz: 4fdbbe25ce3051a02f243c94d17a5956f16d06e2cd031d9c228ed2c1741f1a21015834abe991fc8f92cfe3903b13e9022267ebde3129b1e60a2e47eda812108a
6
+ metadata.gz: 8b72e80621bc7826f53b59d354ac09e5c66859c4f82db4295691955f5f80115c2694ba9e553c64fdbe6f68123c2dafc508b44f5e2a732ac69b637c2e21339724
7
+ data.tar.gz: 22de231eea88b58636967ed3e40fa51c8ceb0c851faf67f6671d44b8a66da07279586641f21e958826cf8ba7657de21f981c85ecf18f2ab2faf282bacabf824d
data/lib/quizzes_v1.rb CHANGED
@@ -40,8 +40,7 @@ class QuizzesV1
40
40
  question_text: question["question"],
41
41
  question_type: "multiple_answers_question",
42
42
  neutral_comments: question["reason"],
43
- correct_comments: question["reason"],
44
- incorrect_comments: question["reason"],
43
+ neutral_comments_html: question["reason"],
45
44
  points_possible: 1
46
45
  }
47
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.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bence Pjatacsuk