all repos — grayfriday @ 62f0018e2f0ff83c09bec0ca5cd167744d546bb7

blackfriday fork with a few changes

Replace snake_case with mixedCase
Vytautas Ĺ altenis vytas@rtfb.lt
Wed, 06 May 2015 15:55:04 +0300
commit

62f0018e2f0ff83c09bec0ca5cd167744d546bb7

parent

eeb2c39339af374e266bb96592b4313ae1f3b1c9

1 files changed, 10 insertions(+), 10 deletions(-)

jump to
M inline.goinline.go

@@ -216,10 +216,10 @@

data = data[offset:] var ( - i = 1 - noteId int - title, link, alt_content []byte - textHasNl = false + i = 1 + noteId int + title, link, altContent []byte + textHasNl = false ) if t == linkDeferredFootnote {

@@ -355,7 +355,7 @@

// reference style link case i < len(data)-1 && data[i] == '[' && data[i+1] != '^': var id []byte - alt_content_considered := false + altContentConsidered := false // look for the id i++

@@ -385,7 +385,7 @@

id = b.Bytes() } else { id = data[1:txtE] - alt_content_considered = true + altContentConsidered = true } } else { id = data[linkB:linkE]

@@ -401,8 +401,8 @@

// keep link and title from reference link = lr.link title = lr.title - if alt_content_considered { - alt_content = lr.text + if altContentConsidered { + altContent = lr.text } i++

@@ -513,8 +513,8 @@

// call the relevant rendering function switch t { case linkNormal: - if len(alt_content) > 0 { - p.r.Link(out, uLink, title, alt_content) + if len(altContent) > 0 { + p.r.Link(out, uLink, title, altContent) } else { p.r.Link(out, uLink, title, content.Bytes()) }