|
From: | Max Nikulin |
Subject: | Re: [PATCH] Fix regex for determining image width from attribute |
Date: | Wed, 24 Nov 2021 21:48:42 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
On 24/11/2021 08:57, Matt Huszagh wrote:
Max Nikulin writes:I may be wrong, but it seems both the old and the new regexps match #+attr_html : :width 50% that is not a keyword due to a space before ":". The dot in the regexp is too permissive.I agree.Despite ".*" includes ": " before ":width", I would prefer explicit space before ":width".Currently we have a space before .*. Would you prefer it after? Anyway, I've also implemented this change. Let me know what you think.
This is related solely to docscring.
+that is not found, use the first #+ATTR_.*:width specification.
I am unsure how to make this phrase more clear, maybe something like"use :width value from the first #+ATTR_,*" or even "#+ATTR_xxx" to avoid ".*".
+ (re-search-forward (funcall attr-re "[a-z]*?") + par-end t))))
https://orgmode.org/worg/dev/org-syntax.html#Keywordshas no requirement that it may be letter only. I expect it to be more coherent with
http://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org-element.el#n2387 that uses "\\S-" non-space character.
[Prev in Thread] | Current Thread | [Next in Thread] |