On 24/11/2021 22:59, Matt Huszagh wrote:
Better?
Certainly. I have not tested the patch though.
I am sorry that I confused you by my note concerning space before
:width. I am afraid, current variant means repeated ":"
+ (concat "^[ \t]*#\\+attr_"
+ backend
+ ":+.*? :width +\\(\\S-+\\)")))
^
-----------------------------------'
Is space after "#+attr_XXX:" is required at all? Is something besides
spaces allowed here?
Untested:
":\\s-*:width\\s-+\\(\\S-+\\)"
I am unsure concerning newlines as space characters, so the following,
perhaps, is more correct:
":[^\n\\S-]*:width[^\n\\S-]+\\(\\S-+\\)"
Actually value is everything till line end besides trailing spaces, so
precise regexp should be a bit longer. Are there backends that allows
spaces between number and units?