TiddlyWiki.org

Ticket #388: imgAlt.patch

File imgAlt.patch, 0.5 kB (added by FND, 1 year ago)
  • Formatter.js

    old new  
    391391                                img.align = "left"; 
    392392                        else if(lookaheadMatch[2]) 
    393393                                img.align = "right"; 
    394                         if(lookaheadMatch[3]) 
     394                        if(lookaheadMatch[3]) { 
    395395                                img.title = lookaheadMatch[3]; 
     396                                img.setAttribute("alt",lookaheadMatch[3]); 
     397                        } else 
     398                                img.setAttribute("alt",lookaheadMatch[4]); 
    396399                        img.src = lookaheadMatch[4]; 
    397400                        w.nextMatch = this.lookaheadRegExp.lastIndex; 
    398401                }