Changeset 43 in code


Ignore:
Timestamp:
Nov 26, 2016, 4:49:35 PM (9 years ago)
Author:
asciimoo
Message:

Merge pull request #32 from dalf/encoding

[enh] support different encodings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/morty.go

    r42 r43  
    360360                                        for {
    361361                                                attrName, attrValue, moreAttr := decoder.TagAttr()
    362                                                 if !bytes.Equal(attrName, []byte("href")) {
    363                                                         continue
    364                                                 }
    365                                                 parsedURI, err := url.Parse(string(attrValue))
    366                                                 if err == nil {
    367                                                         rc.BaseURL = parsedURI
     362                                                if bytes.Equal(attrName, []byte("href")) {
     363                                                        parsedURI, err := url.Parse(string(attrValue))
     364                                                        if err == nil {
     365                                                                rc.BaseURL = parsedURI
     366                                                        }
    368367                                                }
    369368                                                if !moreAttr {
Note: See TracChangeset for help on using the changeset viewer.