[w3m-dev 04316] Re: improper indentation in w3m upon <a>
[email protected] Thu, 04 Dec 2008 04:15:36 +0800
| Newsgroups | gmane.comp.web.w3m.devel |
|---|---|
| Message-ID | <87zljddnh3.fsf__31389.7533146248$1228342474$gmane$org@jidanni.org> |
From: [email protected] >>>>> "KY" == Katsumi Yamaoka <[email protected]> writes: KY> Hm, I don't know why, but I confirmed w3m renders at least KY> <a href="z"></a> KY> as: <a href="z"> </a> More like ...> < actually. >> Actually I use that trick often, like in http://jidanni.org/makefile >> target:%_en.html KY> I see. Could you test this hook with such html contents? KY> --8<---------------cut here---------------start------------->8--- KY> (defun my-w3m-remove-hidden-anchors () KY> "Remove hidden anchors like \"<a href=url></a>\" in the current buffer." KY> (goto-char (point-min)) KY> (let ((case-fold-search t)) KY> (while (re-search-forward "<a[\t\n ]+[^>]+>[\t\n ]*</a>" nil t) KY> (delete-region (match-beginning 0) (match-end 0))))) KY> (add-hook 'w3m-fontify-before-hook 'my-w3m-remove-hidden-anchors) KY> --8<---------------cut here---------------end--------------->8--- KY> If it is ok, I'll embed the identical thing into emacs-w3m. Works fine, but isn't it just a workaround for something that should be fixed in w3m itself? OK, never mind, as w3m-view-source still shows the original, so the rest is your guys internal affairs. OK, thanks. Bye.