bgarrels / textpattern

Automatically exported from code.google.com/p/textpattern
0 stars 0 forks source link

breakclass attribute #405

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Not a problem as such, more an anomaly:

The `breakclass` attribute appears on the `<txp:comments />` tag alone, doesn't 
appear anywhere else even though other tags allow `break` attribute. It should 
be either available globally for any tag that allows `break` or it should be 
removed entirely.

My vote is to remove `breakclass` from the system, because it has no real world 
advantage. You could just as easily (and more cleanly) target children via the 
`wraptag` `class` since by using `breakclass` you'd only be putting duplicates 
of a `class` name onto multiple child tags - which is pointless.

Original issue reported on code.google.com by flaming....@mac.com on 22 Jan 2014 at 9:10

GoogleCodeExporter commented 9 years ago
It's also used on <txp:image_info /> but again, a bit pointless nowadays. Plus, 
it only really applies if the break attribute is a tag: I routinely use 
break="," for example when exporting content as JSON, so breakclass is useless 
in those situations. I'll deprecate it in the next release for those tags.

One thing to note is that its argument will remain in doWrap() because of the 
fact it's a positional argument and other args come after it in the parameter 
list, which are used by plugins. Grrr.

A lot of these utility functions have grown over time and some have a silly 
number of arguments in them now. A rule of thumb is that > 3 args means it 
could be done better. Perhaps as we move the functions over to classes, we can 
deprecate them in favour of a constructor which allows us to set class vars 
easily (implementing interfaces, probably).

Original comment by stefdawson on 2 Feb 2014 at 9:18

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r5738.

Original comment by stefdawson on 17 Feb 2014 at 9:17