[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PATCH: Re: Reading the parameters of a special-block
From: |
Bruno Barbier |
Subject: |
Re: PATCH: Re: Reading the parameters of a special-block |
Date: |
Wed, 19 Oct 2022 20:18:37 +0200 |
Ihor Radchenko <yantar92@posteo.net> writes:
> The property name could be simply :parameters. Just like in src blocks
> (see org-element-src-block-parser).
Indeed. Done.
> We probably want something like
>
> :parameters (and (org-string-nw-p parameters) (org-trim parameters))
>
> Just as in org-element-src-block-parser.
Actually, I forgot to raise the question; but, you answered it anyway! ;-)
Done.
>
> No dangling ")" please.
Sorry. Fixed.
>
>> + (format "#+begin_%s%s%s\n%s#+end_%s" block-type
>> + (if (string= "" block-parameters-line) "" " ")
>> block-parameters-line
>> + contents block-type)))
>
> We will not need to test against ="" with my above comment incorporated.
For `:parameters', I'm now doing the same as in
`org-element-src-block-interpreter'.
> May also test against empty parameters and space-only parameters.
I added more tests.
I also added a new independent patch, to fix a bug when interpreting a special
block that has no content, and some tests.
Let me know if I did miss something,
And thank you for the review!
Bruno
0001-org-element-special-block-interpreter-Fix-when-no-co.patch
Description: Fix no content
0002-lisp-org-element-Add-a-parameters-line-property-to-s.patch
Description: Add :parameters to special blocks