Skip to content

Commit f7799ec

Browse files
committed
rename funcs for readability
1 parent 37562cc commit f7799ec

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

wrp.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,7 @@ func gifPalette(i image.Image, n int64) image.Image {
317317
return i
318318
}
319319

320-
// Capture currently rendered web page to an image and fake ISMAP
321-
func (rq *wrpReq) capture() {
320+
func (rq *wrpReq) captureImage() {
322321
var styles []*css.ComputedStyleProperty
323322
var r, g, b int
324323
var h int64
@@ -447,7 +446,7 @@ func (t *astTransformer) Transform(node *ast.Document, reader text.Reader, pc pa
447446
})
448447
}
449448

450-
func (rq *wrpReq) toMarkdown() {
449+
func (rq *wrpReq) captureMarkdown() {
451450
log.Printf("Processing Markdown conversion request for %v", rq.url)
452451
// TODO: bug - DomainFromURL always prefixes with http:// instead of https
453452
// this causes issues on some websites, fix or write a smarter DomainFromURL
@@ -490,10 +489,10 @@ func pageServer(w http.ResponseWriter, r *http.Request) {
490489
}
491490
rq.navigate() // TODO: if error from navigate do not capture
492491
if rq.imgType == "txt" {
493-
rq.toMarkdown()
492+
rq.captureMarkdown()
494493
return
495494
}
496-
rq.capture()
495+
rq.captureImage()
497496
}
498497

499498
// Process HTTP requests to ISMAP '/map/' url
@@ -522,7 +521,7 @@ func mapServer(w http.ResponseWriter, r *http.Request) {
522521
return
523522
}
524523
rq.navigate() // TODO: if error from navigate do not capture
525-
rq.capture()
524+
rq.captureImage()
526525
}
527526

528527
// Process HTTP requests for images '/img/' url

0 commit comments

Comments
 (0)