From: Saunders, G. <gsa...@ea...> - 2003-03-03 21:36:16
|
> -----Original Message----- > From: Aahz [mailto:aa...@py...]=20 > Sent: March 3, 2003 1:18 PM > To: Saunders, Graydon > Cc: doc...@so... > Subject: Re: [Docutils-users] Multiple html classes per literal block? >=20 >=20 > On Mon, Mar 03, 2003, Saunders, Graydon wrote: > > > > What I want to do is to have a code example which is included as a=20 > > literal block and which has a range of lines specifed as having a=20 > > different class name from the rest of the block, so it's=20 > possible to=20 > > highlight some part of the code example as the interesting bit. > >=20 > > Ideally, one could specify multiple ranges per literal=20 > block and the=20 > > associated class name extension so example 1 and example 2=20 > can easily=20 > > have the same kind of highlighting for the same 'notice=20 > this' things. >=20 > I'd say the best way to deal with this is to create a new=20 > ``highlight_literal`` directive. See the ``parsed_literal``=20 > directive for ideas. You'd then need to string together=20 > multiple text sections, but that's fine IMO, much better than=20 > trying to use line numbers. It's not ok to string together multiple text sections, because the text sections are code examples which get auto-tested, so they have to be complete examples. That's something I don't have any control over. |