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

Commit

Permalink
squash last bug
Browse files Browse the repository at this point in the history
  • Loading branch information
miekg committed Mar 4, 2016
1 parent 3a96b2b commit 11999bf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
4 changes: 0 additions & 4 deletions block.go
Original file line number Diff line number Diff line change
Expand Up @@ -2275,10 +2275,6 @@ func (p *parser) renderParagraph(out *bytes.Buffer, data []byte) {
end--
}

if ok, _ := isMatter(data[beg:end]); ok {
p.inline(out, data[beg:end])
return
}
p.displayMath = false
work := func() bool {
// if we are a single paragraph constisting entirely out of math
Expand Down
5 changes: 0 additions & 5 deletions ial.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ func (p *parser) isInlineAttr(data []byte) int {
esc = !esc
continue
}
// if this is mainmatter, frontmatter, or backmatter it isn't an IAL.
s := string(data[1:i])
if s == "frontmatter" || s == "mainmatter" || s == "backmatter" {
return 0
}
chunk := data[ialB+1 : i]
if len(chunk) == 0 {
return i + 1
Expand Down
6 changes: 3 additions & 3 deletions inline.go
Original file line number Diff line number Diff line change
Expand Up @@ -879,15 +879,15 @@ func leftBrace(p *parser, out *bytes.Buffer, data []byte, offset int) int {
switch what {
case _DOC_FRONT_MATTER:
p.r.DocumentMatter(out, what)
return len(front) + 1
return len(front)
case _DOC_MAIN_MATTER:
p.r.DocumentMatter(out, what)
return len(main) + 1
return len(main)
case _DOC_BACK_MATTER:
p.r.DocumentMatter(out, what)
p.r.References(out, p.citations)
p.appendix = true
return len(back) + 1
return len(back)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions issue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ func TestIssue59(t *testing.T) {
"<t>\nstuff\n</t>\n<t>\n{frontmatter} stuff\n</t>\n",

"stuff\n\n{frontmatter}\n",
"<t>\nstuff\n</t>\n",
"<t>\nstuff\n</t>\n<t>\n\n</t>\n",

"{frontmatter}\ntext\n",
"text", // this should have been wrapped in a <t>, TODO(miek)
"<t>\n\ntext\n</t>\n",
}
doTestsBlockXML(t, tests, EXTENSION_MATTER)
}

0 comments on commit 11999bf

Please sign in to comment.