-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.rb
More file actions
54 lines (32 loc) · 722 Bytes
/
example.rb
File metadata and controls
54 lines (32 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# encoding: UTF-8
require 'pp'
require './parser'
md = <<EOS
# This is あ H1
#This is あ H1#
## This is / H2
###### This is an H6
# This is an H1! #
## This is an H2 ##
### This is an H3 ######
This is an H1
=============
This is an H2
-------------
> ## This is a header in quotation.
>> ## This is a header in quotation.


![Alt text][id]
aaaaa
[id]: url/to/image "Optional title"
Clicking this number[^abc] will lead you to a footnote.
[^abc]: Handy! Now click the return link to go back.
EOS
parser = MDlet.new md
parser.parsed.each do |e|
pp e
end
puts "*"*22
pp parser.ref_value('^abc')
pp parser.ref_value('id')