Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readline-based parser of markdown #3233

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions Units/parser-markdown.r/gaps-in-section-hierarchy.d/expected.tags
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
A input.md /^# A$/;" chapter end:10 sectionMarker:#
B input.md /^### B$/;" subsection chapter:A end:4 sectionMarker:#
C input.md /^## C$/;" section chapter:A end:8 sectionMarker:#
D input.md /^### D$/;" subsection section:A|C end:8 sectionMarker:#
E input.md /^## E$/;" section chapter:A end:10 sectionMarker:#
F input.md /^# F$/;" chapter end:22 sectionMarker:#
H input.md /^###### H$/;" l5subsection chapter:F end:14 sectionMarker:#
I input.md /^##### I$/;" l4subsection chapter:F end:16 sectionMarker:#
J input.md /^#### J$/;" subsubsection chapter:F end:18 sectionMarker:#
K input.md /^### K$/;" subsection chapter:F end:20 sectionMarker:#
L input.md /^## L$/;" section chapter:F end:22 sectionMarker:#
M input.md /^# M$/;" chapter end:34 sectionMarker:#
N input.md /^### N ###$/;" subsection chapter:M end:26 sectionMarker:##
O input.md /^## O ##$/;" section chapter:M end:34 sectionMarker:##
P input.md /^###### P ######$/;" l5subsection section:M|O end:30 sectionMarker:##
Q input.md /^### Q ###$/;" subsection section:M|O end:34 sectionMarker:##
R input.md /^###### R ######$/;" l5subsection subsection:M|O|Q end:34 sectionMarker:##
S input.md /^S$/;" chapter end:42 sectionMarker:=
T input.md /^###### T ######$/;" l5subsection chapter:S end:39 sectionMarker:##
U input.md /^U$/;" section chapter:S end:42 sectionMarker:-
V input.md /^# V #$/;" chapter end:47 sectionMarker:##
W input.md /^W$/;" section chapter:V end:47 sectionMarker:-
X input.md /^X$/;" chapter end:53 sectionMarker:=
Y input.md /^#### Y ####$/;" subsubsection chapter:X end:53 sectionMarker:##
Z input.md /^###### Z ######$/;" l5subsection subsubsection:X|Y end:53 sectionMarker:##
A input.md /^# A$/;" chapter sectionMarker:#
B input.md /^### B$/;" subsection chapter:A sectionMarker:#
C input.md /^## C$/;" section chapter:A sectionMarker:#
D input.md /^### D$/;" subsection section:A|C sectionMarker:#
E input.md /^## E$/;" section chapter:A sectionMarker:#
F input.md /^# F$/;" chapter sectionMarker:#
H input.md /^###### H$/;" l5subsection chapter:F sectionMarker:#
I input.md /^##### I$/;" l4subsection chapter:F sectionMarker:#
J input.md /^#### J$/;" subsubsection chapter:F sectionMarker:#
K input.md /^### K$/;" subsection chapter:F sectionMarker:#
L input.md /^## L$/;" section chapter:F sectionMarker:#
M input.md /^# M$/;" chapter sectionMarker:#
N input.md /^### N ###$/;" subsection chapter:M sectionMarker:##
O input.md /^## O ##$/;" section chapter:M sectionMarker:##
P input.md /^###### P ######$/;" l5subsection section:M|O sectionMarker:##
Q input.md /^### Q ###$/;" subsection section:M|O sectionMarker:##
R input.md /^###### R ######$/;" l5subsection subsection:M|O|Q sectionMarker:##
S input.md /^S$/;" chapter sectionMarker:=
T input.md /^###### T ######$/;" l5subsection chapter:S sectionMarker:##
U input.md /^U$/;" section chapter:S sectionMarker:-
V input.md /^# V #$/;" chapter sectionMarker:##
W input.md /^W$/;" section chapter:V sectionMarker:-
X input.md /^X$/;" chapter sectionMarker:=
Y input.md /^#### Y ####$/;" subsubsection chapter:X sectionMarker:##
Z input.md /^###### Z ######$/;" l5subsection subsubsection:X|Y sectionMarker:##
36 changes: 18 additions & 18 deletions Units/parser-markdown.r/scope-field-markdown.d/expected.tags
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
a0 input.md /^# a0$/;" c end:6
b0 input.md /^## b0$/;" s chapter:a0 end:6
c0 input.md /^### c0$/;" S section:a0""b0 end:6
a1 input.md /^# a1$/;" c end:8
a2 input.md /^# a2$/;" c end:25
b20 input.md /^## b20$/;" s chapter:a2 end:12
b21 input.md /^## b21$/;" s chapter:a2 end:16
c21 input.md /^### c21$/;" S section:a2""b21 end:16
b22 input.md /^## b22$/;" s chapter:a2 end:22
c220 input.md /^### c220$/;" S section:a2""b22 end:20
c221 input.md /^### c221$/;" S section:a2""b22 end:22
b23 input.md /^b23$/;" s chapter:a2 end:25
a3 input.md /^a3$/;" c end:37
b31 input.md /^b31$/;" s chapter:a3 end:31
b32 input.md /^b32$/;" s chapter:a3 end:37
c320 input.md /^### c320$/;" S section:a3""b32 end:35
c321 input.md /^### c321$/;" S section:a3""b32 end:37
a4 input.md /^a4$/;" c end:39
a0 input.md /^# a0$/;" c
b0 input.md /^## b0$/;" s chapter:a0
c0 input.md /^### c0$/;" S section:a0""b0
a1 input.md /^# a1$/;" c
a2 input.md /^# a2$/;" c
b20 input.md /^## b20$/;" s chapter:a2
b21 input.md /^## b21$/;" s chapter:a2
c21 input.md /^### c21$/;" S section:a2""b21
b22 input.md /^## b22$/;" s chapter:a2
c220 input.md /^### c220$/;" S section:a2""b22
c221 input.md /^### c221$/;" S section:a2""b22
b23 input.md /^b23$/;" s chapter:a2
a3 input.md /^a3$/;" c
b31 input.md /^b31$/;" s chapter:a3
b32 input.md /^b32$/;" s chapter:a3
c320 input.md /^### c320$/;" S section:a3""b32
c321 input.md /^### c321$/;" S section:a3""b32
a4 input.md /^a4$/;" c
54 changes: 27 additions & 27 deletions Units/parser-markdown.r/simple-markdown.d/expected.tags
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
a input.md /^# a$/;" c end:12 sectionMarker:#
b input.md /^## b$/;" s chapter:a end:12 sectionMarker:#
c input.md /^### c$/;" S section:a""b end:12 sectionMarker:#
d input.md /^#### d$/;" t subsection:a""b""c end:12 sectionMarker:#
e input.md /^##### e$/;" T subsubsection:a""b""c""d end:12 sectionMarker:#
f input.md /^###### f$/;" u l4subsection:a""b""c""d""e end:12 sectionMarker:#
g input.md /^# g #$/;" c end:13 sectionMarker:##
h input.md /^# h ##$/;" c end:61 sectionMarker:##
i input.md /^## i #$/;" s chapter:h end:16 sectionMarker:##
j input.md /^## j ##$/;" s chapter:h end:17 sectionMarker:##
k input.md /^## k ###$/;" s chapter:h end:61 sectionMarker:##
l input.md /^### l #$/;" S section:h""k end:20 sectionMarker:##
m input.md /^### m ##$/;" S section:h""k end:21 sectionMarker:##
n input.md /^### n ###$/;" S section:h""k end:22 sectionMarker:##
o input.md /^### o ###$/;" S section:h""k end:61 sectionMarker:##
p input.md /^#### p #$/;" t subsection:h""k""o end:25 sectionMarker:##
q input.md /^#### q #####$/;" t subsection:h""k""o end:61 sectionMarker:##
r input.md /^##### r #$/;" T subsubsection:h""k""o""q end:28 sectionMarker:##
s input.md /^##### s ######$/;" T subsubsection:h""k""o""q end:61 sectionMarker:##
t input.md /^###### t #$/;" u l4subsection:h""k""o""q""s end:59 sectionMarker:##
u input.md /^###### u #######$/;" u l4subsection:h""k""o""q""s end:61 sectionMarker:##
A input.md /^A$/;" c end:64 sectionMarker:=
B input.md /^B$/;" c end:74 sectionMarker:=
C input.md /^C$/;" c end:105 sectionMarker:=
D input.md /^D$/;" s chapter:C end:100 sectionMarker:-
E input.md /^E$/;" s chapter:C end:103 sectionMarker:-
F input.md /^F$/;" s chapter:C end:105 sectionMarker:-
a input.md /^# a$/;" c sectionMarker:#
b input.md /^## b$/;" s chapter:a sectionMarker:#
c input.md /^### c$/;" S section:a""b sectionMarker:#
d input.md /^#### d$/;" t subsection:a""b""c sectionMarker:#
e input.md /^##### e$/;" T subsubsection:a""b""c""d sectionMarker:#
f input.md /^###### f$/;" u l4subsection:a""b""c""d""e sectionMarker:#
g input.md /^# g #$/;" c sectionMarker:##
h input.md /^# h ##$/;" c sectionMarker:##
i input.md /^## i #$/;" s chapter:h sectionMarker:##
j input.md /^## j ##$/;" s chapter:h sectionMarker:##
k input.md /^## k ###$/;" s chapter:h sectionMarker:##
l input.md /^### l #$/;" S section:h""k sectionMarker:##
m input.md /^### m ##$/;" S section:h""k sectionMarker:##
n input.md /^### n ###$/;" S section:h""k sectionMarker:##
o input.md /^### o ###$/;" S section:h""k sectionMarker:##
p input.md /^#### p #$/;" t subsection:h""k""o sectionMarker:##
q input.md /^#### q #####$/;" t subsection:h""k""o sectionMarker:##
r input.md /^##### r #$/;" T subsubsection:h""k""o""q sectionMarker:##
s input.md /^##### s ######$/;" T subsubsection:h""k""o""q sectionMarker:##
t input.md /^###### t #$/;" u l4subsection:h""k""o""q""s sectionMarker:##
u input.md /^###### u #######$/;" u l4subsection:h""k""o""q""s sectionMarker:##
A input.md /^A$/;" c sectionMarker:=
B input.md /^B$/;" c sectionMarker:=
C input.md /^C$/;" c sectionMarker:=
D input.md /^D$/;" s chapter:C sectionMarker:-
E input.md /^E$/;" s chapter:C sectionMarker:-
F input.md /^F$/;" s chapter:C sectionMarker:-
x input.md /^function x$/;" f
y input.md /^function y$/;" f
z input.md /^z()$/;" f
Expand Down
4 changes: 2 additions & 2 deletions Units/parser-markdown.r/yaml-in-code-block.d/expected.tags
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Mline input.md /^### Mline$/;" S language:Markdown end:25
Mline2 input.md /^### Mline2$/;" S language:Markdown end:26
Mline input.md /^### Mline$/;" S language:Markdown
Mline2 input.md /^### Mline2$/;" S language:Markdown
EOF input.md /^cat <<EOF$/;" h language:Sh end:19
hello input.md /^hello()$/;" f language:Sh
Loading