Skip to content
  • Albert Astals Cid's avatar
    Markdown: Don't crash on files with html images, alt text, inside links · f686f4c6
    Albert Astals Cid authored
    If we have code like <a><img></a><a><img></a> and the img has alt text
    
    The old code did
      remove image
      insert alt text
    but when we remove the image, the qtextdocument says
      "i don't need the <a> anymore since there's nothing inside"
    and then everything breaks because the layout has changed and we're
    iterating over "unexisting" text blocks
    
    So instead we just insert the alt text and
    since we have selected the image with the cursor it will
    replace it correctly
    
    BUGS: 444971
    f686f4c6