simple_markdown 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27049df5e088377b66b483a338605b40aa211782
4
- data.tar.gz: eaad76923186cffbb6a14a64f33db648e1dd8f00
3
+ metadata.gz: 52abdccf10ccbc9eafad3be5caed51583cf40357
4
+ data.tar.gz: ca1487fd73283f0d68eed8a17fce6793cdcbea1e
5
5
  SHA512:
6
- metadata.gz: 1f520f14a17a5b9aa17f1699fa3ad6f02340ad4cc0ff0e9293d7cc97f8721b3e4d7337b2ceed4728b20d3f0cceffcb8908f1d7c0eacbf28e97c5dab6f1aca4bf
7
- data.tar.gz: 19e256473417af98d881ecce986c6149ea554f4c4d8036827bd33ac56c7e72810247a28603358b8249ff5d001c85a737a6326d73222a8f23be0dd679d3e4ffb5
6
+ metadata.gz: 570f1b2b88abb8d3e97f03213e0706c99639f23ce9cb62652aa223218794a51f5aa48321639dbebeb44555c20ab06787adfa904a13f47bd378a94f082ddbf0e5
7
+ data.tar.gz: 0caebe8b933f3f3d548e05f183c43b38e38d0b44903a7876c9a6d25bd417125178fbe6274084ba41112b9f7c93232c87529d073f69bec301a9ef7f39a3dc91a5
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module SimpleMarkdown
2
4
  module ActionView
3
5
  module Helpers
@@ -27,33 +29,40 @@ module SimpleMarkdown
27
29
  elsif @text_map.peek.match(/^\s*```\s*$/) # code block
28
30
  @text_map.next
29
31
  parse_code
30
- elsif @text_map.peek.match(/^\#.*/)
32
+ elsif @text_map.peek.match(/^\s*\#/)
31
33
  parse_title # title, only works if has return before
32
34
  else # normal block
33
35
  @io << "<p>"
36
+ @io << "\n"
34
37
  parse_normal
38
+ @io << "\n"
35
39
  @io << "</p>"
36
40
  end
37
41
  end
38
42
  rescue
39
- @io << "<p></p>" # in case empty text
43
+ # do nothing
40
44
  end
41
45
  end
42
46
 
43
47
  def parse_normal
48
+ first_time = true
44
49
  begin
45
50
  line = @text_map.next
46
- unless(line.match(/^$/)) # end paragraph if empty line
51
+ while(!line.match(/^\s*$/)) # end paragraph if empty line
47
52
  line.gsub!(/(^|[^!])\[([^\]]*)\]\(([^\)]*)\)/, "#{'\1'}<a href=\"#{'\3'.strip}\">#{'\2'}</a>") # link
48
53
  line.gsub!(/!\[([^\]]*)\]\(([^\)]*)\)/, "<img src=\"#{'\2'}\" alt=\"#{'\1'.strip}\">") # link
49
54
  line.gsub!(/^\s*\*\s(.*)/, "• #{'\1'}<br>") # list
50
55
  line.gsub!(/`([^`]+)`/) { |match| "<code>#{h(Regexp.last_match[1])}</code>"} # inline code
51
56
  line.gsub!(/(^|[^\*])\*([^\*]+)\*/, "#{'\1'}<em>#{'\2'}</em>") # italic
52
57
  line.gsub!(/\*\*([^\*]*)\*\*/, "<strong>#{'\1'}</strong>") # bold
58
+ if(first_time)
59
+ first_time = false
60
+ else
61
+ @io << " "
62
+ end
53
63
  @io << line
54
- @io << "<br>" if line.match(/\s{2,}$/) # return if more than 2 spaces at the end of the line
55
- @io << "\n"
56
- parse_normal
64
+ @io << "<br>\n" if line.match(/\s{2,}$/) # return if more than 2 spaces at the end of the line
65
+ line = @text_map.next
57
66
  end
58
67
  rescue StopIteration
59
68
  @continue = false
@@ -81,7 +90,7 @@ module SimpleMarkdown
81
90
 
82
91
  def parse_title
83
92
  line = @text_map.next
84
- line.gsub!(/^\b{0,4}(\#{1,6})(.*)$/) { |match|
93
+ line.gsub!(/^\s{0,4}(\#{1,6})(.*)$/) { |match|
85
94
  num = Regexp.last_match[1].size # number of # = type of <hn></hn>
86
95
  "<h#{num}>#{Regexp.last_match[2].strip}</h#{num}>"
87
96
  }
@@ -1,3 +1,3 @@
1
1
  module SimpleMarkdown
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -316,3 +316,995 @@ SimpleMarkdownTest: test_markdown
316
316
  SimpleMarkdownTest: test_truth
317
317
  ------------------------------
318
318
   (0.1ms) rollback transaction
319
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
320
+  (2.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
321
+  (0.5ms) select sqlite_version(*)
322
+  (1.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
323
+  (0.2ms) SELECT version FROM "schema_migrations"
324
+  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
325
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
326
+  (0.2ms) begin transaction
327
+ ------------------------------
328
+ SimpleMarkdownTest: test_truth
329
+ ------------------------------
330
+  (0.1ms) rollback transaction
331
+  (0.1ms) begin transaction
332
+ ---------------------------------
333
+ SimpleMarkdownTest: test_markdown
334
+ ---------------------------------
335
+  (0.1ms) rollback transaction
336
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
337
+  (2.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
338
+  (0.4ms) select sqlite_version(*)
339
+  (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
340
+  (0.2ms) SELECT version FROM "schema_migrations"
341
+  (1.8ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
342
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
343
+  (0.1ms) begin transaction
344
+ ---------------------------------
345
+ SimpleMarkdownTest: test_markdown
346
+ ---------------------------------
347
+  (0.1ms) rollback transaction
348
+  (0.1ms) begin transaction
349
+ ------------------------------
350
+ SimpleMarkdownTest: test_truth
351
+ ------------------------------
352
+  (0.1ms) rollback transaction
353
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
354
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
355
+  (0.8ms) select sqlite_version(*)
356
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
357
+  (0.2ms) SELECT version FROM "schema_migrations"
358
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
359
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
360
+  (0.1ms) begin transaction
361
+ ---------------------------------
362
+ SimpleMarkdownTest: test_markdown
363
+ ---------------------------------
364
+  (0.1ms) rollback transaction
365
+  (0.1ms) begin transaction
366
+ ------------------------------
367
+ SimpleMarkdownTest: test_truth
368
+ ------------------------------
369
+  (0.1ms) rollback transaction
370
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
371
+  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
372
+  (0.1ms) select sqlite_version(*)
373
+  (2.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
374
+  (0.4ms) SELECT version FROM "schema_migrations"
375
+  (9.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
376
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
377
+  (0.1ms) begin transaction
378
+ ------------------------------
379
+ SimpleMarkdownTest: test_truth
380
+ ------------------------------
381
+  (0.1ms) rollback transaction
382
+  (0.1ms) begin transaction
383
+ ---------------------------------
384
+ SimpleMarkdownTest: test_markdown
385
+ ---------------------------------
386
+  (0.1ms) rollback transaction
387
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
388
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
389
+  (0.4ms) select sqlite_version(*)
390
+  (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
391
+  (0.2ms) SELECT version FROM "schema_migrations"
392
+  (3.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
393
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
394
+  (0.2ms) begin transaction
395
+ ------------------------------------
396
+ SimpleMarkdownTest: test_test_titles
397
+ ------------------------------------
398
+  (0.1ms) rollback transaction
399
+  (0.1ms) begin transaction
400
+ ------------------------------
401
+ SimpleMarkdownTest: test_truth
402
+ ------------------------------
403
+  (0.1ms) rollback transaction
404
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
405
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
406
+  (0.1ms) select sqlite_version(*)
407
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
408
+  (0.2ms) SELECT version FROM "schema_migrations"
409
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
410
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
411
+  (0.1ms) begin transaction
412
+ -------------------------------------
413
+ SimpleMarkdownTest: test_empty_string
414
+ -------------------------------------
415
+  (0.1ms) rollback transaction
416
+  (0.1ms) begin transaction
417
+ ------------------------------------
418
+ SimpleMarkdownTest: test_test_titles
419
+ ------------------------------------
420
+  (0.1ms) rollback transaction
421
+  (0.1ms) begin transaction
422
+ ------------------------------
423
+ SimpleMarkdownTest: test_truth
424
+ ------------------------------
425
+  (0.1ms) rollback transaction
426
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
427
+  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
428
+  (0.1ms) select sqlite_version(*)
429
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
430
+  (0.2ms) SELECT version FROM "schema_migrations"
431
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
432
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
433
+  (0.1ms) begin transaction
434
+ ------------------------------
435
+ SimpleMarkdownTest: test_truth
436
+ ------------------------------
437
+  (0.1ms) rollback transaction
438
+  (0.1ms) begin transaction
439
+ ------------------------------------
440
+ SimpleMarkdownTest: test_test_titles
441
+ ------------------------------------
442
+  (0.1ms) rollback transaction
443
+  (0.2ms) begin transaction
444
+ -------------------------------------
445
+ SimpleMarkdownTest: test_empty_string
446
+ -------------------------------------
447
+  (0.1ms) rollback transaction
448
+  (0.1ms) begin transaction
449
+ ---------------------------------
450
+ SimpleMarkdownTest: test_emphasis
451
+ ---------------------------------
452
+  (0.2ms) rollback transaction
453
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
454
+  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
455
+  (0.1ms) select sqlite_version(*)
456
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
457
+  (0.3ms) SELECT version FROM "schema_migrations"
458
+  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
459
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
460
+  (0.2ms) begin transaction
461
+ ------------------------------
462
+ SimpleMarkdownTest: test_truth
463
+ ------------------------------
464
+  (0.1ms) rollback transaction
465
+  (0.1ms) begin transaction
466
+ -------------------------------------
467
+ SimpleMarkdownTest: test_empty_string
468
+ -------------------------------------
469
+  (0.2ms) rollback transaction
470
+  (0.2ms) begin transaction
471
+ ------------------------------------
472
+ SimpleMarkdownTest: test_test_titles
473
+ ------------------------------------
474
+  (0.1ms) rollback transaction
475
+  (0.1ms) begin transaction
476
+ ---------------------------------
477
+ SimpleMarkdownTest: test_emphasis
478
+ ---------------------------------
479
+  (0.2ms) rollback transaction
480
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
481
+  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
482
+  (0.1ms) select sqlite_version(*)
483
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
484
+  (0.1ms) SELECT version FROM "schema_migrations"
485
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
486
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
487
+  (0.2ms) begin transaction
488
+ -------------------------------------
489
+ SimpleMarkdownTest: test_empty_string
490
+ -------------------------------------
491
+  (0.2ms) rollback transaction
492
+  (0.1ms) begin transaction
493
+ ------------------------------------
494
+ SimpleMarkdownTest: test_test_titles
495
+ ------------------------------------
496
+  (0.1ms) rollback transaction
497
+  (0.1ms) begin transaction
498
+ ---------------------------------
499
+ SimpleMarkdownTest: test_emphasis
500
+ ---------------------------------
501
+  (0.1ms) rollback transaction
502
+  (0.1ms) begin transaction
503
+ ------------------------------
504
+ SimpleMarkdownTest: test_truth
505
+ ------------------------------
506
+  (0.1ms) rollback transaction
507
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
508
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
509
+  (0.9ms) select sqlite_version(*)
510
+  (7.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
511
+  (0.2ms) SELECT version FROM "schema_migrations"
512
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
513
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
514
+  (0.1ms) begin transaction
515
+ ----------------------------------
516
+ SimpleMarkdownTest: test_paragraph
517
+ ----------------------------------
518
+  (0.1ms) rollback transaction
519
+  (0.1ms) begin transaction
520
+ ---------------------------------
521
+ SimpleMarkdownTest: test_emphasis
522
+ ---------------------------------
523
+  (0.1ms) rollback transaction
524
+  (0.1ms) begin transaction
525
+ ------------------------------
526
+ SimpleMarkdownTest: test_truth
527
+ ------------------------------
528
+  (0.0ms) rollback transaction
529
+  (0.0ms) begin transaction
530
+ ------------------------------------
531
+ SimpleMarkdownTest: test_test_titles
532
+ ------------------------------------
533
+  (0.1ms) rollback transaction
534
+  (0.0ms) begin transaction
535
+ -------------------------------------
536
+ SimpleMarkdownTest: test_empty_string
537
+ -------------------------------------
538
+  (0.0ms) rollback transaction
539
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
540
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
541
+  (1.4ms) select sqlite_version(*)
542
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
543
+  (0.1ms) SELECT version FROM "schema_migrations"
544
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
545
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
546
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
547
+  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
548
+  (0.1ms) select sqlite_version(*)
549
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
550
+  (0.2ms) SELECT version FROM "schema_migrations"
551
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
552
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
553
+  (0.1ms) begin transaction
554
+ ---------------------------------
555
+ SimpleMarkdownTest: test_emphasis
556
+ ---------------------------------
557
+  (0.1ms) rollback transaction
558
+  (0.1ms) begin transaction
559
+ -------------------------------------
560
+ SimpleMarkdownTest: test_empty_string
561
+ -------------------------------------
562
+  (0.1ms) rollback transaction
563
+  (0.1ms) begin transaction
564
+ ------------------------------------
565
+ SimpleMarkdownTest: test_test_titles
566
+ ------------------------------------
567
+  (0.1ms) rollback transaction
568
+  (0.1ms) begin transaction
569
+ ------------------------------
570
+ SimpleMarkdownTest: test_truth
571
+ ------------------------------
572
+  (0.1ms) rollback transaction
573
+  (0.1ms) begin transaction
574
+ ----------------------------------
575
+ SimpleMarkdownTest: test_paragraph
576
+ ----------------------------------
577
+  (0.1ms) rollback transaction
578
+  (0.1ms) begin transaction
579
+ --------------------------------------------
580
+ SimpleMarkdownTest: test_multiple_paragraphs
581
+ --------------------------------------------
582
+  (0.2ms) rollback transaction
583
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
584
+  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
585
+  (0.1ms) select sqlite_version(*)
586
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
587
+  (0.1ms) SELECT version FROM "schema_migrations"
588
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
589
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
590
+  (0.2ms) begin transaction
591
+ ----------------------------------
592
+ SimpleMarkdownTest: test_paragraph
593
+ ----------------------------------
594
+  (1.6ms) rollback transaction
595
+  (0.1ms) begin transaction
596
+ --------------------------------------------
597
+ SimpleMarkdownTest: test_multiple_paragraphs
598
+ --------------------------------------------
599
+  (0.1ms) rollback transaction
600
+  (0.1ms) begin transaction
601
+ -------------------------------------
602
+ SimpleMarkdownTest: test_empty_string
603
+ -------------------------------------
604
+  (0.1ms) rollback transaction
605
+  (0.0ms) begin transaction
606
+ ------------------------------
607
+ SimpleMarkdownTest: test_truth
608
+ ------------------------------
609
+  (0.1ms) rollback transaction
610
+  (0.1ms) begin transaction
611
+ ---------------------------------
612
+ SimpleMarkdownTest: test_emphasis
613
+ ---------------------------------
614
+  (0.1ms) rollback transaction
615
+  (0.2ms) begin transaction
616
+ ------------------------------------
617
+ SimpleMarkdownTest: test_test_titles
618
+ ------------------------------------
619
+  (0.1ms) rollback transaction
620
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
621
+  (1.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
622
+  (0.1ms) select sqlite_version(*)
623
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
624
+  (1.6ms) SELECT version FROM "schema_migrations"
625
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
626
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
627
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
628
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
629
+  (0.1ms) select sqlite_version(*)
630
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
631
+  (0.2ms) SELECT version FROM "schema_migrations"
632
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
633
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
634
+  (0.1ms) begin transaction
635
+ ---------------------------------
636
+ SimpleMarkdownTest: test_emphasis
637
+ ---------------------------------
638
+  (0.1ms) rollback transaction
639
+  (0.1ms) begin transaction
640
+ -------------------------------------
641
+ SimpleMarkdownTest: test_empty_string
642
+ -------------------------------------
643
+  (0.1ms) rollback transaction
644
+  (0.1ms) begin transaction
645
+ ------------------------------
646
+ SimpleMarkdownTest: test_truth
647
+ ------------------------------
648
+  (0.1ms) rollback transaction
649
+  (0.0ms) begin transaction
650
+ ----------------------------------
651
+ SimpleMarkdownTest: test_paragraph
652
+ ----------------------------------
653
+  (0.1ms) rollback transaction
654
+  (0.1ms) begin transaction
655
+ ---------------------------------------------------------------------------
656
+ SimpleMarkdownTest: test_no_return_with_one_return_without_space_at_the_end
657
+ ---------------------------------------------------------------------------
658
+  (0.2ms) rollback transaction
659
+  (0.1ms) begin transaction
660
+ --------------------------------------------
661
+ SimpleMarkdownTest: test_multiple_paragraphs
662
+ --------------------------------------------
663
+  (0.1ms) rollback transaction
664
+  (0.1ms) begin transaction
665
+ ------------------------------------
666
+ SimpleMarkdownTest: test_test_titles
667
+ ------------------------------------
668
+  (0.1ms) rollback transaction
669
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
670
+  (87.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
671
+  (0.2ms) select sqlite_version(*)
672
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
673
+  (0.6ms) SELECT version FROM "schema_migrations"
674
+  (4.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
675
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
676
+  (0.4ms) begin transaction
677
+ ------------------------------
678
+ SimpleMarkdownTest: test_truth
679
+ ------------------------------
680
+  (0.1ms) rollback transaction
681
+  (0.2ms) begin transaction
682
+ -------------------------------------
683
+ SimpleMarkdownTest: test_empty_string
684
+ -------------------------------------
685
+  (0.1ms) rollback transaction
686
+  (0.1ms) begin transaction
687
+ ------------------------------------
688
+ SimpleMarkdownTest: test_test_titles
689
+ ------------------------------------
690
+  (0.1ms) rollback transaction
691
+  (0.1ms) begin transaction
692
+ --------------------------------------------
693
+ SimpleMarkdownTest: test_multiple_paragraphs
694
+ --------------------------------------------
695
+  (0.1ms) rollback transaction
696
+  (0.1ms) begin transaction
697
+ ---------------------------------
698
+ SimpleMarkdownTest: test_emphasis
699
+ ---------------------------------
700
+  (0.1ms) rollback transaction
701
+  (0.1ms) begin transaction
702
+ ----------------------------------
703
+ SimpleMarkdownTest: test_paragraph
704
+ ----------------------------------
705
+  (0.1ms) rollback transaction
706
+  (0.1ms) begin transaction
707
+ ---------------------------------------------------------------------------
708
+ SimpleMarkdownTest: test_no_return_with_one_return_without_space_at_the_end
709
+ ---------------------------------------------------------------------------
710
+  (0.2ms) rollback transaction
711
+ ActiveRecord::SchemaMigration Load (1.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
712
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
713
+  (0.2ms) select sqlite_version(*)
714
+  (2.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
715
+  (0.2ms) SELECT version FROM "schema_migrations"
716
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
717
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
718
+  (0.2ms) begin transaction
719
+ -------------------------------------
720
+ SimpleMarkdownTest: test_empty_string
721
+ -------------------------------------
722
+  (0.1ms) rollback transaction
723
+  (0.1ms) begin transaction
724
+ ---------------------------------
725
+ SimpleMarkdownTest: test_emphasis
726
+ ---------------------------------
727
+  (0.1ms) rollback transaction
728
+  (0.1ms) begin transaction
729
+ ---------------------------------------------------------------------------
730
+ SimpleMarkdownTest: test_no_return_with_one_return_without_space_at_the_end
731
+ ---------------------------------------------------------------------------
732
+  (0.2ms) rollback transaction
733
+  (0.1ms) begin transaction
734
+ ------------------------------
735
+ SimpleMarkdownTest: test_truth
736
+ ------------------------------
737
+  (0.1ms) rollback transaction
738
+  (0.1ms) begin transaction
739
+ ------------------------------------
740
+ SimpleMarkdownTest: test_test_titles
741
+ ------------------------------------
742
+  (0.1ms) rollback transaction
743
+  (0.2ms) begin transaction
744
+ ----------------------------------
745
+ SimpleMarkdownTest: test_paragraph
746
+ ----------------------------------
747
+  (0.1ms) rollback transaction
748
+  (0.1ms) begin transaction
749
+ --------------------------------------------
750
+ SimpleMarkdownTest: test_multiple_paragraphs
751
+ --------------------------------------------
752
+  (4.4ms) rollback transaction
753
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
754
+  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
755
+  (0.1ms) select sqlite_version(*)
756
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
757
+  (0.1ms) SELECT version FROM "schema_migrations"
758
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
759
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
760
+  (0.2ms) begin transaction
761
+ ------------------------------
762
+ SimpleMarkdownTest: test_truth
763
+ ------------------------------
764
+  (0.1ms) rollback transaction
765
+  (0.1ms) begin transaction
766
+ --------------------------------------------
767
+ SimpleMarkdownTest: test_multiple_paragraphs
768
+ --------------------------------------------
769
+  (0.4ms) rollback transaction
770
+  (0.7ms) begin transaction
771
+ ---------------------------------------------------------------------------
772
+ SimpleMarkdownTest: test_no_return_with_one_return_without_space_at_the_end
773
+ ---------------------------------------------------------------------------
774
+  (0.2ms) rollback transaction
775
+  (0.3ms) begin transaction
776
+ ----------------------------------
777
+ SimpleMarkdownTest: test_paragraph
778
+ ----------------------------------
779
+  (0.2ms) rollback transaction
780
+  (0.1ms) begin transaction
781
+ ------------------------------------
782
+ SimpleMarkdownTest: test_test_titles
783
+ ------------------------------------
784
+  (0.1ms) rollback transaction
785
+  (0.1ms) begin transaction
786
+ -------------------------------------
787
+ SimpleMarkdownTest: test_empty_string
788
+ -------------------------------------
789
+  (0.1ms) rollback transaction
790
+  (0.1ms) begin transaction
791
+ ---------------------------------
792
+ SimpleMarkdownTest: test_emphasis
793
+ ---------------------------------
794
+  (0.3ms) rollback transaction
795
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
796
+  (2.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
797
+  (2.2ms) select sqlite_version(*)
798
+  (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
799
+  (0.1ms) SELECT version FROM "schema_migrations"
800
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
801
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
802
+  (0.1ms) begin transaction
803
+ ------------------------------
804
+ SimpleMarkdownTest: test_truth
805
+ ------------------------------
806
+  (0.1ms) rollback transaction
807
+  (0.1ms) begin transaction
808
+ ------------------------------------
809
+ SimpleMarkdownTest: test_test_titles
810
+ ------------------------------------
811
+  (0.1ms) rollback transaction
812
+  (0.1ms) begin transaction
813
+ ----------------------------------
814
+ SimpleMarkdownTest: test_paragraph
815
+ ----------------------------------
816
+  (0.2ms) rollback transaction
817
+  (0.2ms) begin transaction
818
+ ---------------------------------------------------------------------------
819
+ SimpleMarkdownTest: test_no_return_with_one_return_without_space_at_the_end
820
+ ---------------------------------------------------------------------------
821
+  (0.4ms) rollback transaction
822
+  (0.1ms) begin transaction
823
+ ---------------------------------
824
+ SimpleMarkdownTest: test_emphasis
825
+ ---------------------------------
826
+  (0.2ms) rollback transaction
827
+  (0.1ms) begin transaction
828
+ -------------------------------------
829
+ SimpleMarkdownTest: test_empty_string
830
+ -------------------------------------
831
+  (0.1ms) rollback transaction
832
+  (0.1ms) begin transaction
833
+ --------------------------------------------
834
+ SimpleMarkdownTest: test_multiple_paragraphs
835
+ --------------------------------------------
836
+  (0.2ms) rollback transaction
837
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
838
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
839
+  (0.1ms) select sqlite_version(*)
840
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
841
+  (0.1ms) SELECT version FROM "schema_migrations"
842
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
843
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
844
+  (65.2ms) begin transaction
845
+ ------------------------------
846
+ SimpleMarkdownTest: test_truth
847
+ ------------------------------
848
+  (0.1ms) rollback transaction
849
+  (0.1ms) begin transaction
850
+ ---------------------------------------------------------------------------
851
+ SimpleMarkdownTest: test_no_return_with_one_return_without_space_at_the_end
852
+ ---------------------------------------------------------------------------
853
+  (0.2ms) rollback transaction
854
+  (0.1ms) begin transaction
855
+ ---------------------------------
856
+ SimpleMarkdownTest: test_emphasis
857
+ ---------------------------------
858
+  (0.1ms) rollback transaction
859
+  (0.1ms) begin transaction
860
+ ----------------------------------
861
+ SimpleMarkdownTest: test_paragraph
862
+ ----------------------------------
863
+  (0.1ms) rollback transaction
864
+  (0.1ms) begin transaction
865
+ -------------------------------------
866
+ SimpleMarkdownTest: test_empty_string
867
+ -------------------------------------
868
+  (0.1ms) rollback transaction
869
+  (0.1ms) begin transaction
870
+ ------------------------------------
871
+ SimpleMarkdownTest: test_test_titles
872
+ ------------------------------------
873
+  (0.1ms) rollback transaction
874
+  (0.1ms) begin transaction
875
+ --------------------------------------------
876
+ SimpleMarkdownTest: test_multiple_paragraphs
877
+ --------------------------------------------
878
+  (0.1ms) rollback transaction
879
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
880
+  (3.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
881
+  (0.1ms) select sqlite_version(*)
882
+  (2.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
883
+  (0.1ms) SELECT version FROM "schema_migrations"
884
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
885
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
886
+  (0.1ms) begin transaction
887
+ ------------------------------
888
+ SimpleMarkdownTest: test_truth
889
+ ------------------------------
890
+  (0.1ms) rollback transaction
891
+  (0.1ms) begin transaction
892
+ -------------------------------------
893
+ SimpleMarkdownTest: test_empty_string
894
+ -------------------------------------
895
+  (0.1ms) rollback transaction
896
+  (0.1ms) begin transaction
897
+ ------------------------------------
898
+ SimpleMarkdownTest: test_test_titles
899
+ ------------------------------------
900
+  (0.1ms) rollback transaction
901
+  (0.1ms) begin transaction
902
+ ----------------------------------
903
+ SimpleMarkdownTest: test_paragraph
904
+ ----------------------------------
905
+  (0.1ms) rollback transaction
906
+  (0.0ms) begin transaction
907
+ --------------------------------------------
908
+ SimpleMarkdownTest: test_multiple_paragraphs
909
+ --------------------------------------------
910
+  (0.1ms) rollback transaction
911
+  (0.2ms) begin transaction
912
+ ---------------------------------
913
+ SimpleMarkdownTest: test_emphasis
914
+ ---------------------------------
915
+  (0.1ms) rollback transaction
916
+  (0.1ms) begin transaction
917
+ ---------------------------------------------------------------------------
918
+ SimpleMarkdownTest: test_no_return_with_one_return_without_space_at_the_end
919
+ ---------------------------------------------------------------------------
920
+  (0.2ms) rollback transaction
921
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
922
+  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
923
+  (0.1ms) select sqlite_version(*)
924
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
925
+  (0.1ms) SELECT version FROM "schema_migrations"
926
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
927
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
928
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
929
+  (7.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
930
+  (0.1ms) select sqlite_version(*)
931
+  (4.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
932
+  (0.2ms) SELECT version FROM "schema_migrations"
933
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
934
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
935
+  (0.1ms) begin transaction
936
+ ------------------------------
937
+ SimpleMarkdownTest: test_truth
938
+ ------------------------------
939
+  (0.1ms) rollback transaction
940
+  (0.1ms) begin transaction
941
+ -------------------------------------
942
+ SimpleMarkdownTest: test_empty_string
943
+ -------------------------------------
944
+  (0.1ms) rollback transaction
945
+  (0.1ms) begin transaction
946
+ --------------------------------------------
947
+ SimpleMarkdownTest: test_multiple_paragraphs
948
+ --------------------------------------------
949
+  (0.1ms) rollback transaction
950
+  (0.1ms) begin transaction
951
+ ---------------------------------------------------------------------------
952
+ SimpleMarkdownTest: test_no_return_with_one_return_without_space_at_the_end
953
+ ---------------------------------------------------------------------------
954
+  (0.8ms) rollback transaction
955
+  (0.1ms) begin transaction
956
+ ----------------------------------
957
+ SimpleMarkdownTest: test_paragraph
958
+ ----------------------------------
959
+  (0.1ms) rollback transaction
960
+  (0.2ms) begin transaction
961
+ ------------------------------------
962
+ SimpleMarkdownTest: test_test_titles
963
+ ------------------------------------
964
+  (0.1ms) rollback transaction
965
+  (0.1ms) begin transaction
966
+ ---------------------------------
967
+ SimpleMarkdownTest: test_emphasis
968
+ ---------------------------------
969
+  (0.1ms) rollback transaction
970
+  (0.1ms) begin transaction
971
+ -----------------------------
972
+ SimpleMarkdownTest: test_zbra
973
+ -----------------------------
974
+  (0.3ms) rollback transaction
975
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
976
+  (2.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
977
+  (0.1ms) select sqlite_version(*)
978
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
979
+  (0.1ms) SELECT version FROM "schema_migrations"
980
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
981
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
982
+  (0.1ms) begin transaction
983
+ ---------------------------------
984
+ SimpleMarkdownTest: test_emphasis
985
+ ---------------------------------
986
+  (0.2ms) rollback transaction
987
+  (0.2ms) begin transaction
988
+ ---------------------------------------------------------------------------
989
+ SimpleMarkdownTest: test_no_return_with_one_return_without_space_at_the_end
990
+ ---------------------------------------------------------------------------
991
+  (0.3ms) rollback transaction
992
+  (0.1ms) begin transaction
993
+ --------------------------------------------
994
+ SimpleMarkdownTest: test_multiple_paragraphs
995
+ --------------------------------------------
996
+  (0.5ms) rollback transaction
997
+  (0.1ms) begin transaction
998
+ ------------------------------
999
+ SimpleMarkdownTest: test_truth
1000
+ ------------------------------
1001
+  (0.4ms) rollback transaction
1002
+  (0.2ms) begin transaction
1003
+ ----------------------------------
1004
+ SimpleMarkdownTest: test_paragraph
1005
+ ----------------------------------
1006
+  (0.2ms) rollback transaction
1007
+  (0.2ms) begin transaction
1008
+ -------------------------------------
1009
+ SimpleMarkdownTest: test_empty_string
1010
+ -------------------------------------
1011
+  (0.2ms) rollback transaction
1012
+  (0.6ms) begin transaction
1013
+ -----------------------------
1014
+ SimpleMarkdownTest: test_zbra
1015
+ -----------------------------
1016
+  (0.3ms) rollback transaction
1017
+  (0.2ms) begin transaction
1018
+ ------------------------------------
1019
+ SimpleMarkdownTest: test_test_titles
1020
+ ------------------------------------
1021
+  (0.5ms) rollback transaction
1022
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1023
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1024
+  (0.1ms) select sqlite_version(*)
1025
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1026
+  (0.1ms) SELECT version FROM "schema_migrations"
1027
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1028
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1029
+  (0.2ms) begin transaction
1030
+ ------------------------------
1031
+ SimpleMarkdownTest: test_truth
1032
+ ------------------------------
1033
+  (0.1ms) rollback transaction
1034
+  (0.1ms) begin transaction
1035
+ --------------------------------------------
1036
+ SimpleMarkdownTest: test_multiple_paragraphs
1037
+ --------------------------------------------
1038
+  (0.1ms) rollback transaction
1039
+  (0.1ms) begin transaction
1040
+ -------------------------------------
1041
+ SimpleMarkdownTest: test_empty_string
1042
+ -------------------------------------
1043
+  (0.1ms) rollback transaction
1044
+  (0.1ms) begin transaction
1045
+ ---------------------------------
1046
+ SimpleMarkdownTest: test_emphasis
1047
+ ---------------------------------
1048
+  (0.1ms) rollback transaction
1049
+  (0.1ms) begin transaction
1050
+ -----------------------------
1051
+ SimpleMarkdownTest: test_zbra
1052
+ -----------------------------
1053
+  (0.2ms) rollback transaction
1054
+  (0.1ms) begin transaction
1055
+ ---------------------------------------------------------------------------
1056
+ SimpleMarkdownTest: test_no_return_with_one_return_without_space_at_the_end
1057
+ ---------------------------------------------------------------------------
1058
+  (0.1ms) rollback transaction
1059
+  (0.1ms) begin transaction
1060
+ ------------------------------------
1061
+ SimpleMarkdownTest: test_test_titles
1062
+ ------------------------------------
1063
+  (0.1ms) rollback transaction
1064
+  (0.1ms) begin transaction
1065
+ ----------------------------------
1066
+ SimpleMarkdownTest: test_paragraph
1067
+ ----------------------------------
1068
+  (0.1ms) rollback transaction
1069
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1070
+  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1071
+  (0.1ms) select sqlite_version(*)
1072
+  (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1073
+  (0.1ms) SELECT version FROM "schema_migrations"
1074
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1075
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1076
+  (0.1ms) begin transaction
1077
+ ------------------------------
1078
+ SimpleMarkdownTest: test_truth
1079
+ ------------------------------
1080
+  (0.1ms) rollback transaction
1081
+  (0.1ms) begin transaction
1082
+ -------------------------------------
1083
+ SimpleMarkdownTest: test_empty_string
1084
+ -------------------------------------
1085
+  (0.1ms) rollback transaction
1086
+  (0.1ms) begin transaction
1087
+ ---------------------------------------------------------------------------
1088
+ SimpleMarkdownTest: test_no_return_with_one_return_without_space_at_the_end
1089
+ ---------------------------------------------------------------------------
1090
+  (0.1ms) rollback transaction
1091
+  (0.1ms) begin transaction
1092
+ ---------------------------------
1093
+ SimpleMarkdownTest: test_emphasis
1094
+ ---------------------------------
1095
+  (0.1ms) rollback transaction
1096
+  (0.1ms) begin transaction
1097
+ ------------------------------------
1098
+ SimpleMarkdownTest: test_test_titles
1099
+ ------------------------------------
1100
+  (0.1ms) rollback transaction
1101
+  (0.1ms) begin transaction
1102
+ ----------------------------------
1103
+ SimpleMarkdownTest: test_paragraph
1104
+ ----------------------------------
1105
+  (0.1ms) rollback transaction
1106
+  (0.1ms) begin transaction
1107
+ --------------------------------------------
1108
+ SimpleMarkdownTest: test_multiple_paragraphs
1109
+ --------------------------------------------
1110
+  (0.0ms) rollback transaction
1111
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
1112
+  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1113
+  (0.6ms) select sqlite_version(*)
1114
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1115
+  (0.1ms) SELECT version FROM "schema_migrations"
1116
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1117
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1118
+  (0.1ms) begin transaction
1119
+ -------------------------------------
1120
+ SimpleMarkdownTest: test_empty_string
1121
+ -------------------------------------
1122
+  (0.1ms) rollback transaction
1123
+  (0.1ms) begin transaction
1124
+ ----------------------------------------------------------------------------------------
1125
+ SimpleMarkdownTest: test_no_<br>_with_one_return_without_spaces_at_the_end_and_add_space
1126
+ ----------------------------------------------------------------------------------------
1127
+  (8.5ms) rollback transaction
1128
+  (0.1ms) begin transaction
1129
+ ------------------------------------
1130
+ SimpleMarkdownTest: test_test_titles
1131
+ ------------------------------------
1132
+  (0.1ms) rollback transaction
1133
+  (0.1ms) begin transaction
1134
+ --------------------------------------------
1135
+ SimpleMarkdownTest: test_multiple_paragraphs
1136
+ --------------------------------------------
1137
+  (0.1ms) rollback transaction
1138
+  (0.0ms) begin transaction
1139
+ ----------------------------------------------------------------------------
1140
+ SimpleMarkdownTest: test_add_<br>_if_return_with_2_or_more_spaces_at_the_end
1141
+ ----------------------------------------------------------------------------
1142
+  (0.2ms) rollback transaction
1143
+  (0.1ms) begin transaction
1144
+ ----------------------------------
1145
+ SimpleMarkdownTest: test_paragraph
1146
+ ----------------------------------
1147
+  (0.1ms) rollback transaction
1148
+  (0.1ms) begin transaction
1149
+ ---------------------------------
1150
+ SimpleMarkdownTest: test_emphasis
1151
+ ---------------------------------
1152
+  (0.1ms) rollback transaction
1153
+  (0.1ms) begin transaction
1154
+ ------------------------------
1155
+ SimpleMarkdownTest: test_truth
1156
+ ------------------------------
1157
+  (0.1ms) rollback transaction
1158
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1159
+  (1.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1160
+  (0.1ms) select sqlite_version(*)
1161
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1162
+  (0.2ms) SELECT version FROM "schema_migrations"
1163
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1164
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1165
+  (0.1ms) begin transaction
1166
+ --------------------------------------------
1167
+ SimpleMarkdownTest: test_multiple_paragraphs
1168
+ --------------------------------------------
1169
+  (0.1ms) rollback transaction
1170
+  (0.1ms) begin transaction
1171
+ ----------------------------------------------------------------------------------------
1172
+ SimpleMarkdownTest: test_no_<br>_with_one_return_without_spaces_at_the_end_and_add_space
1173
+ ----------------------------------------------------------------------------------------
1174
+  (0.1ms) rollback transaction
1175
+  (0.1ms) begin transaction
1176
+ ----------------------------------------------------------------------------
1177
+ SimpleMarkdownTest: test_add_<br>_if_return_with_2_or_more_spaces_at_the_end
1178
+ ----------------------------------------------------------------------------
1179
+  (0.2ms) rollback transaction
1180
+  (0.1ms) begin transaction
1181
+ ------------------------------
1182
+ SimpleMarkdownTest: test_truth
1183
+ ------------------------------
1184
+  (0.1ms) rollback transaction
1185
+  (0.1ms) begin transaction
1186
+ ----------------------------------
1187
+ SimpleMarkdownTest: test_paragraph
1188
+ ----------------------------------
1189
+  (0.1ms) rollback transaction
1190
+  (0.1ms) begin transaction
1191
+ ---------------------------------
1192
+ SimpleMarkdownTest: test_emphasis
1193
+ ---------------------------------
1194
+  (0.1ms) rollback transaction
1195
+  (0.1ms) begin transaction
1196
+ ------------------------------------
1197
+ SimpleMarkdownTest: test_test_titles
1198
+ ------------------------------------
1199
+  (0.2ms) rollback transaction
1200
+  (0.1ms) begin transaction
1201
+ -------------------------------------
1202
+ SimpleMarkdownTest: test_empty_string
1203
+ -------------------------------------
1204
+  (0.1ms) rollback transaction
1205
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1206
+  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1207
+  (0.2ms) select sqlite_version(*)
1208
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1209
+  (0.1ms) SELECT version FROM "schema_migrations"
1210
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1211
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1212
+  (0.1ms) begin transaction
1213
+ ----------------------------------------------------------------------------------------
1214
+ SimpleMarkdownTest: test_no_<br>_with_one_return_without_spaces_at_the_end_and_add_space
1215
+ ----------------------------------------------------------------------------------------
1216
+  (0.1ms) rollback transaction
1217
+  (0.1ms) begin transaction
1218
+ --------------------------------------------
1219
+ SimpleMarkdownTest: test_multiple_paragraphs
1220
+ --------------------------------------------
1221
+  (0.1ms) rollback transaction
1222
+  (0.1ms) begin transaction
1223
+ ----------------------------------
1224
+ SimpleMarkdownTest: test_paragraph
1225
+ ----------------------------------
1226
+  (0.1ms) rollback transaction
1227
+  (0.1ms) begin transaction
1228
+ ----------------------------------------------------------------------------
1229
+ SimpleMarkdownTest: test_add_<br>_if_return_with_2_or_more_spaces_at_the_end
1230
+ ----------------------------------------------------------------------------
1231
+  (0.1ms) rollback transaction
1232
+  (0.0ms) begin transaction
1233
+ -------------------------------------
1234
+ SimpleMarkdownTest: test_empty_string
1235
+ -------------------------------------
1236
+  (0.1ms) rollback transaction
1237
+  (0.1ms) begin transaction
1238
+ ---------------------------------
1239
+ SimpleMarkdownTest: test_emphasis
1240
+ ---------------------------------
1241
+  (0.1ms) rollback transaction
1242
+  (0.1ms) begin transaction
1243
+ ------------------------------------
1244
+ SimpleMarkdownTest: test_test_titles
1245
+ ------------------------------------
1246
+  (0.1ms) rollback transaction
1247
+  (0.0ms) begin transaction
1248
+ ------------------------------
1249
+ SimpleMarkdownTest: test_truth
1250
+ ------------------------------
1251
+  (0.1ms) rollback transaction
1252
+ ActiveRecord::SchemaMigration Load (1.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1253
+  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1254
+  (0.1ms) select sqlite_version(*)
1255
+  (5.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1256
+  (0.3ms) SELECT version FROM "schema_migrations"
1257
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1258
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1259
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1260
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1261
+  (0.1ms) select sqlite_version(*)
1262
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1263
+  (0.2ms) SELECT version FROM "schema_migrations"
1264
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1265
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1266
+  (0.2ms) begin transaction
1267
+ -------------------------------------
1268
+ SimpleMarkdownTest: test_empty_string
1269
+ -------------------------------------
1270
+  (0.1ms) rollback transaction
1271
+  (0.1ms) begin transaction
1272
+ ----------------------------------
1273
+ SimpleMarkdownTest: test_paragraph
1274
+ ----------------------------------
1275
+  (0.1ms) rollback transaction
1276
+  (0.1ms) begin transaction
1277
+ ------------------------------
1278
+ SimpleMarkdownTest: test_truth
1279
+ ------------------------------
1280
+  (0.1ms) rollback transaction
1281
+  (0.1ms) begin transaction
1282
+ --------------------------------------------
1283
+ SimpleMarkdownTest: test_multiple_paragraphs
1284
+ --------------------------------------------
1285
+  (0.0ms) rollback transaction
1286
+  (0.1ms) begin transaction
1287
+ ----------------------------------------------------------------------------------------
1288
+ SimpleMarkdownTest: test_no_<br>_with_one_return_without_spaces_at_the_end_and_add_space
1289
+ ----------------------------------------------------------------------------------------
1290
+  (0.1ms) rollback transaction
1291
+  (0.1ms) begin transaction
1292
+ ---------------------------------
1293
+ SimpleMarkdownTest: test_emphasis
1294
+ ---------------------------------
1295
+  (0.1ms) rollback transaction
1296
+  (0.1ms) begin transaction
1297
+ -------------------------------
1298
+ SimpleMarkdownTest: test_strong
1299
+ -------------------------------
1300
+  (0.1ms) rollback transaction
1301
+  (0.0ms) begin transaction
1302
+ ------------------------------------
1303
+ SimpleMarkdownTest: test_test_titles
1304
+ ------------------------------------
1305
+  (0.1ms) rollback transaction
1306
+  (0.1ms) begin transaction
1307
+ ----------------------------------------------------------------------------
1308
+ SimpleMarkdownTest: test_add_<br>_if_return_with_2_or_more_spaces_at_the_end
1309
+ ----------------------------------------------------------------------------
1310
+  (0.1ms) rollback transaction
@@ -8,8 +8,38 @@ class SimpleMarkdownTest < ActiveSupport::TestCase
8
8
  assert_kind_of Module, SimpleMarkdown
9
9
  end
10
10
 
11
- test "markdown" do
12
- assert_equal "<h1>Title</h1>", simple_markdown("# Title")
11
+ test "test titles" do
12
+ 1.upto(6) do |i|
13
+ assert_equal "<h#{i}>Title</h#{i}>", simple_markdown("#{'#'*i} Title")
14
+ end
15
+ end
16
+
17
+ test "empty string" do
18
+ assert_equal "", simple_markdown("")
19
+ end
20
+
21
+ test "paragraph" do
22
+ assert_equal "<p>\nText\n</p>", simple_markdown("Text")
23
+ end
24
+
25
+ test "multiple paragraphs" do
26
+ assert_equal "<p>\nText\n</p><p>\nText2\n</p>", simple_markdown("Text\n\nText2")
27
+ end
28
+
29
+ test "no <br> with one return without spaces at the end and add space" do
30
+ assert_equal "<p>\nText and more\n</p>", simple_markdown("Text\nand more")
31
+ end
32
+
33
+ test "add <br> if return with 2 or more spaces at the end" do
34
+ assert_equal "<p>\nText <br>\n and more\n</p>", simple_markdown("Text \nand more")
35
+ end
36
+
37
+ test "emphasis" do
38
+ assert_equal "<p>\n<em>Text</em>\n</p>", simple_markdown("*Text*")
39
+ end
40
+
41
+ test "strong" do
42
+ assert_equal "<p>\n<strong>Text</strong>\n</p>", simple_markdown("**Text**")
13
43
  end
14
44
 
15
45
  end
metadata CHANGED
@@ -1,20 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noémien Kocher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-10 00:00:00.000000000 Z
11
+ date: 2015-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '4.2'
20
+ - - '>='
18
21
  - !ruby/object:Gem::Version
19
22
  version: 4.2.1
20
23
  type: :runtime
@@ -22,23 +25,27 @@ dependencies:
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '4.2'
30
+ - - '>='
25
31
  - !ruby/object:Gem::Version
26
32
  version: 4.2.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: sqlite3
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - '>='
37
+ - - ~>
32
38
  - !ruby/object:Gem::Version
33
39
  version: '0'
34
40
  type: :development
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - '>='
44
+ - - ~>
39
45
  - !ruby/object:Gem::Version
40
46
  version: '0'
41
- description: Given a markdown formated text, transform it to html
47
+ description: Given a markdown formated text, transforms it to html via a simple method
48
+ `simple_markdown`
42
49
  email:
43
50
  - nkcr.je@gmail.com
44
51
  executables: []
@@ -46,7 +53,6 @@ extensions: []
46
53
  extra_rdoc_files: []
47
54
  files:
48
55
  - MIT-LICENSE
49
- - README.rdoc
50
56
  - Rakefile
51
57
  - lib/simple_markdown.rb
52
58
  - lib/simple_markdown/action_view/helpers.rb
data/README.rdoc DELETED
@@ -1,3 +0,0 @@
1
- = SimpleMarkdown
2
-
3
- This project rocks and uses MIT-LICENSE.