Boost logo

Boost-Build :

Subject: Re: [Boost-build] New doc format.
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2018-01-20 03:48:40


On Fri, Jan 19, 2018 at 7:12 PM, Steven Watanabe via Boost-build <
boost-build_at_[hidden]> wrote:

> AMDG
>
> On 01/18/2018 09:42 PM, Rene Rivera wrote:
> > On Tue, Jan 16, 2018 at 1:13 PM, Rene Rivera <grafikrobot_at_[hidden]>
> wrote:
> >
> >> On Tue, Jan 16, 2018 at 12:04 PM, Steven Watanabe via Boost-build <
> >> boost-build_at_[hidden]> wrote:
> >>
> >>>
> >>> It's independent of the rewrite,
> >>> but it's something that I want to be implemented before
> >>> this goes live.
> >>>
> >>
> >> Sure. I'll go research what options we have on that. In an ideal world
> we
> >> could augment the default one it uses and push that upsream. As that
> way a
> >> bunch of other web contexts would get jam coloring.
> >>
> >
> > OK, looked at the coloring.. Did the easiest attempt first. I
> implemented a
> > jam language coloring for highlight.js. And used that as the coloring for
> > the doc. And I did a partial tagging of the docs with the "[source,jam]"
> > attribute. Please take a look at the updated docs.
> >
> >
>
> It doesn't seem like it quite works:
> https://grafikrobot.github.io/b2doc/#bbv2.reference.class.abstract-target

Hmm.. Not valid Jam code hence the problems. But I can probably make that
work anyway. Best I could do with a few hours of work :-)

> - The highlighting of keywords and rulenames seems
> be interfering with each other somehow.
> - The comment/keyword/rule colors seem to be the same.
>

If you are referring to "rule" being red in the link above.. That's a
parsing problem because those rules do have a body. And the parser
definition I created assumed legal Jam code.

Note: I can send you my emacs mode, which has the highlighting
> mostly correct, if that would help.

Wouldn't help since it's been ages since I look at emacs code (and I no
longer use it).

> I'm also willing to
> port one of my existing highlighters myself if you can point
> me to the system I need to implement.
>

All I can do is point you to the docs about highlighters. Specifically
which ones it currently supports <
http://asciidoctor.org/docs/user-manual/#available-source-highlighters>.
I'm assuming to implement your own you'd either have to extend one of those
existing ones (like I did). Or write Ruby code to extend asciidoctor.

> Also, I dislike javascript based highlighting on principle.
>

I've become a pragmatist for this. I'd rather see something that requires
less of my time and is more widely used than worry about which language
it's implemented in. And whether it runs at conversion time or in the
browser.

-- 
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk