Ihor Radchenko <yanta...@posteo.net> writes: > Your request, in its core, is asking to make treatment of verbatim > blocks more regular in ox-html.
I would phrase it differently. Just to be clear, my concern isn't simply "verbatim blocks", and it isn't simply to make handling "more regular". Apologies for the innacuracy in the subject line which may have led to the confusion. My concern is that when exporting to HTML, for some HTML elements that are generated there is no straightforward way to add HTML attributes (e.g. "class", "style" etc). It is the inability to do so for some AST nodes that I consider a bug. Importantly, my concern isn't the handling of things that are NOT HTML attributes such as `:textarea'. Also, notably, my concern extends to possibly other blocks that aren't verbatim that lack the appropriate handling of #+ATTR_HTML keyword. > So, if we start allowing arbitrary attributes in more blocks, may as > well include specially handled attributes like :textarea. Yes, it is possible to address my concern while also extending support for non-HTML attributes like :textarea. However, they still are distinct things. For instance, it's possible that extending support for :textarea is considered a feature request (as opposed to a bug), and thus that support is added to the main branch as opposed to bugfix. > As a bonus, it will be possible to factor out common code handling > attributes (including :textarea) into a new internal function that can > then be reused. No disagreement here. > Yup. But since you are asking to add new features to ox-html, we may > as well do it in full (support all attributes, including special > attributes). I believe, that's perhaps the core of the disagreement. To me the request isn't about adding new features (though it's /related/ to a more general feature request that you seem to be considering), but about resolving what I consider a buggy behaviour. >> Additionally, I consider the absence of such support to be a bug. > > Since we do not promise it anywhere, it is not necessarily a bug. We also don't, as far as I am aware, mention that support for #+ATTR_HTML is ONLY available for some AST nodes and NOT others. Given that for the treatment of :textarea we are very clear on this point, the fact that we don't for #+ATTR_HTML suggested to me that this was a bug. I suppose it's debatable, however, whether it's a bug in the documentation or the code. But, given most (all?) HTML elements support attributes, it would be odd if the intent of ox-html was to provide a way to support it via #+ATTR_HTML while simultaneously /intentionally/ restricting its use to only a few nodes. Since `:textarea' is a "custom" attribute with special signifance, it makes sense that support for it may be limited in scope. Do you still consider this to be a feature request instead of a bug? -- Suhail