[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More about name anchors
Function `w3m-fontify-anchors' also helps me understand more about the
difference between text properties `w3m-name-anchor' and
`w3m-name-anchor2', but it might be a bug: The text property
`w3m-name-anchor' is based upon a regex "<_id[ \t\r\f\n]+", but there is
no such thing AFAIK as an HTML tag '_id'. I have seen an 'id' element
within html tags, and a cursory web search shows '_id' being a form
specific to mongodb. So, is that a bug? Maybe started as a typing error?
On 2019-05-30 10:57, Boruch Baum wrote:
> Function `w3m-fontify-anchors' is what sets the values for text property
> `w3m-name-anchor2'. A central part of it is a 'cond' statement with two
> clauses: `href' and `name'. However, the `href' clause seems to be
> duplicating the `name' clause, so shouldn't the function be of the form:
>
> (when href
> ....
> ; (w3m-add-text-properties
> ; start (point-max)
> ; (list 'w3m-name-anchor2
> ; (cons (w3m-decode-entities-string name)
> ; prenames)))
> )
> (when name
> (w3m-add-text-properties
> start (point-max)
> (list 'w3m-name-anchor2
> (cons (w3m-decode-entities-string name)
> prenames))))
>
> This is apart from the question/issue I raised in my prior email why
> this text property needs to be accumulating a list of all its preceding
> anchors in addition to its own.
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0