On 29/11/2021 07:23, Matt Huszagh wrote:
Max Nikulin writes:
My current variant:
":\\(?:[^\n]*?[[:blank:]]\\)?:width[[:blank:]]+\\(\\S-+\\)"
The regexp should not match e.g.
#+attr_html: :alt something
:width 600
P.S. I would prefer to use the same parser as ox does.
I can probably implement this if people want. But, let me know if I
should indeed use org-export-registered-backends. However, I'm starting
to feel like this should be separate patch (the goal for mine was just
to prioritize attr_org).
I am against regexps that have obvious flaws. I admit however that the
regexp that appeared long time ago before your patch fails for some
corner cases as well.
I will left decision to you and to Org developers and maintainers.
Additionally, I like that Timothy transformed a code fragment into
`org-display-inline-image--width' function and, I suppose, it deserves
some unit tests (see testing/README file).