Let's talk about the user interface now.
What the option should look like?
It seems to me that this would be useful for inline tags only.
I would propose to use another modifier before the tag. For example:
A<a>
(A for "no attributes")
or
f<a>
(f for foldable)
You seems to also want an option to specify that all attributes of inline
tags should be folded.
I propose to add an 'a' or 'A' (or 'f' or 'F') to
defaulttranslateoption
Do you have other ideas?
for specific tags, 'f' for "foldable" sounds reasonable to me. however,
i
understand that 'defaulttranslateoption' is for tags that were not specified
in any other category, right?
as there's already '_default_break', '_default_inline',
'_default_placeholder', how about adding '_default_foldable', and changing
the '_default_inline' found in Xhtml.pm to a '_default_foldable' list
instead, thus marking all inline tags as also foldable? for XHTML at least,
i can't see any reason for an inline tag not to be foldable too.
and yes, any foldable tag is considered inline, it doesn't make any sense to
fold its attributes if these aren't going to be included in the translation
file.
so perhaps keep them tags in '_default_inline', and instead have a bool
option called 'fold_inline_tags'? these are really implementation details
and i trust your judgement in knowing how to expose the option the easiest
way.
thanks,
poy