I guess no, but if you're using a syntax-colorizing, I think the
thing to do is using the scanner/tokenizer part, that will yield you
tokens for a specified language, and then you just have to create
your own class of Encoder/Converter that will consume tokens
and generate what you need, here an array like you want. It should
be easy, for example, with CodeRay [1] : write your encoder, and
don't use the html encoder.
If such a tool exists, I can rejoice, because it'd allow me to build
an awsum Prawn based presentation builder.
Very interesting. I was also thinking of using Prawn to generate
slides.
I guess no, but if you're using a syntax-colorizing, I think the
thing to do is using the scanner/tokenizer part, that will yield you
tokens for a specified language, and then you just have to create
your own class of Encoder/Converter that will consume tokens
and generate what you need, here an array like you want. It should
be easy, for example, with CodeRay [1] : write your encoder, and
don't use the html encoder.
Cool, I'll look into this, thanks.
If such a tool exists, I can rejoice, because it'd allow me to build
an awsum Prawn based presentation builder.
Very interesting. I was also thinking of using Prawn to generate
slides.
This code is very old, but will eventually be replaced with modernized
Prawn code:
If you're thinking of working on this, you're welcome to fork this
repos so that we don't duplicate effort.
Hmm... that's an interesting idea too. I'll take a quick look at how
easy it is to get under the hood of Code Ray, and if it seems
complicated, such a hack would probably do fine.