Re: Class Text : category 'emphasis' - method #allBold BUT NO #allItalics?
> On 06-07-2018, at 1:30 AM, H. Hirzel <[hidden email]> wrote:
> string size = 0 ifTrue: [^self].
> self addAttribute: TextEmphasis italic from: 1 to: string size.
> Should this be added?
Well, it certainly isn't an expensive method to add, so one could say "certainly! go for it!". Given that there's a modest number of text emphases involved (bold, underline, strikeout, italic, regular, maybe one day 'styled by shout') it wouldn't be ridiculous to have each one covered.
On the other hand, where does one stop? It's always tricky. I suppose one argument would be "if it was useful it would be there already" but that devolves rapidly into the sort of nonsense you see from naive wannabe economists. In this case, you've done the work to write it, it's small and simple, so stick it in.