Skip to content
This repository was archived by the owner on Nov 10, 2020. It is now read-only.

Commit 11999bf

Browse files
committed
squash last bug
1 parent 3a96b2b commit 11999bf

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

block.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,10 +2275,6 @@ func (p *parser) renderParagraph(out *bytes.Buffer, data []byte) {
22752275
end--
22762276
}
22772277

2278-
if ok, _ := isMatter(data[beg:end]); ok {
2279-
p.inline(out, data[beg:end])
2280-
return
2281-
}
22822278
p.displayMath = false
22832279
work := func() bool {
22842280
// if we are a single paragraph constisting entirely out of math

ial.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ func (p *parser) isInlineAttr(data []byte) int {
6464
esc = !esc
6565
continue
6666
}
67-
// if this is mainmatter, frontmatter, or backmatter it isn't an IAL.
68-
s := string(data[1:i])
69-
if s == "frontmatter" || s == "mainmatter" || s == "backmatter" {
70-
return 0
71-
}
7267
chunk := data[ialB+1 : i]
7368
if len(chunk) == 0 {
7469
return i + 1

inline.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -879,15 +879,15 @@ func leftBrace(p *parser, out *bytes.Buffer, data []byte, offset int) int {
879879
switch what {
880880
case _DOC_FRONT_MATTER:
881881
p.r.DocumentMatter(out, what)
882-
return len(front) + 1
882+
return len(front)
883883
case _DOC_MAIN_MATTER:
884884
p.r.DocumentMatter(out, what)
885-
return len(main) + 1
885+
return len(main)
886886
case _DOC_BACK_MATTER:
887887
p.r.DocumentMatter(out, what)
888888
p.r.References(out, p.citations)
889889
p.appendix = true
890-
return len(back) + 1
890+
return len(back)
891891
}
892892
}
893893
}

issue_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ func TestIssue59(t *testing.T) {
1919
"<t>\nstuff\n</t>\n<t>\n{frontmatter} stuff\n</t>\n",
2020

2121
"stuff\n\n{frontmatter}\n",
22-
"<t>\nstuff\n</t>\n",
22+
"<t>\nstuff\n</t>\n<t>\n\n</t>\n",
2323

2424
"{frontmatter}\ntext\n",
25-
"text", // this should have been wrapped in a <t>, TODO(miek)
25+
"<t>\n\ntext\n</t>\n",
2626
}
2727
doTestsBlockXML(t, tests, EXTENSION_MATTER)
2828
}

0 commit comments

Comments
 (0)