groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] GroffHub


From: John Gardner
Subject: Re: [Groff] GroffHub
Date: Thu, 21 Jul 2016 23:48:08 +1000

Thank you!

The hardest part was definitely the repeating-font macros
<https://github-lightshow.herokuapp.com/?utf8=%E2%9C%93&scope=from-url&grammar_url=https%3A%2F%2Fgithub.com%2FAlhadis%2Flanguage-roff%2Fblob%2Fstatic%2Froff.json&grammar_text=&code_source=from-url&code_url=https%3A%2F%2Fgithub.com%2FAlhadis%2Flanguage-roff%2Fblob%2Fmaster%2Ftests%2Frepeating-fonts.3&code=>:
.BI, .BR, .IR, etc. Having them correctly match in order, accounting for
escaped line-breaks, omitted quotes, embedded double quotes... it wouldn't
have taken well over a month alone if the highlighting engine was capable
of matching more than one line at a time.

Yes, a limitation in highlighting is that each regular expression is scoped
to one line at once, so there's no possibility of knowing what's on the
next line, or what was on the previous line. This is done by the
TextMate-grammar engine for performance reasons, but it also makes working
with line-based languages like Roff a nightmare.

(In other words, I'm insane to have gone this far)

On 21 July 2016 at 23:36, Werner LEMBERG <address@hidden> wrote:

>
> > Over the last four months, I've been working on a
> > TextMate-compatible grammar
> > <https://github.com/Alhadis/language-roff> to improve the
> > highlighting of Roff source on GitHub.  I submitted my pull request
> > <https://github.com/github/linguist/pull/3126> earlier today, and
> > the effect on code readability is *very* visible.  Examples are in
> > the PR.
>
> Very nice!
>
>
>     Werner
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]