>>     [...]
>> and Org seems to generate the following from it:
>>     [...]
>
> Sorry for the trouble. The cause is on my side: `#+BEGIN_HTML' has not
> been an export block since Org 8.0. Current Org reads it as a special
> block named "HTML", so its contents are parsed as Org text, which gives
> the escaped tags and the bare image URLs turned into <img> that you saw.

Ah, so your Org code was written for Github's implementation and not for
Emacs', I see.

>> Can someone shed some light on this (so I can improve `elpa-admin.el` to
>> fix the false positives above)?
> The messages come from the regexp in `elpaa--doc-html-adjust-auxfiles',
> which matched ` src="<img src="' inside the escaped text.

Yup.

> I've attached the patch that requires the attribute to be inside a real
> tag (the FIXME next to that loop). With my old README it goes from 18
> matches to none, and it still finds relative `src' attributes, including
> in tags over several lines. It also stops the old regexp from rewriting
> escaped text such as `&lt;img src="foo.png"' when a file of that name
> exists. Hope this helps.

Thanks.  So far I've kept the current simplistic approach while waiting
for some real false positive to tighten the code.  Sadly, your false
positives were "not real" (the HTML code was not the intended one in the
first place: with the new version of your `README.org`, Emacs generates
an HTML file without those weird thingies and doesn't trigger false
positives).

>    (let* ((docdir (if (stringp docfile) (file-name-directory docfile)))
> -         (regexp " \\(?:src\\)=\"\\([^#/.\"][^:\"#]+\\)\""))
> +         (regexp "<[[:alpha:]][^<>]*[ 
> \t\n]src=\"\\([^#/.\"<>][^:\"#<>]*\\)\""))

This can cost O(N²) 🙁
[ Admittedly, not on `master` any more, but `elpa.gnu.org` won't run
  Emacs-32 for a few more years.  ]


=== Stefan


Reply via email to