public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* ANN: skylighting - a new syntax highlighting library
@ 2016-12-24 23:13 John MacFarlane
       [not found] ` <20161224231305.GA76841-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: John MacFarlane @ 2016-12-24 23:13 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

For about a decade, pandoc has used my highlighting-kate
library for syntax highlighting.  highlighting-kate used
parsec parsers that were automatically generated from XML
syntax descriptions for the Kate editor; this gave us
coverage of a large number of languages in a pure Haskell
library.

Unfortunately some aspects of highlighting-kate's
architecture weren't well thought-out, and the library
persistently stumbled on syntaxes that include other
syntaxes (e.g., javascript parts of HTML documents,
or doxygen documentation inside C++ code comments).
This wasn't easy to fix without major architectural
changes, so I just released a new library, skylighting,
that will replace highlighting-kate in pandoc.

https://github.com/jgm/skylighting
https://hackage.haskell.org/package/skylighting

From the point of view of a pandoc user, the change
shouldn't be noticeable at all; the same languages are
supported, and things should work the same, minus some of
the bugs highlighting-kate had.  But the new library is
better-designed, more accurate, and easier to maintain.
Current pandoc HEAD already uses the library, if you want to
test it out.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ANN: skylighting - a new syntax highlighting library
       [not found] ` <20161224231305.GA76841-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2016-12-28  4:12   ` Ivan Lazar Miljenovic
       [not found]     ` <CA+u6gbyZ63Y1OfOUy3oDO3vtC1ykxUWMTmCtDw2vL+FGjMUtrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Ivan Lazar Miljenovic @ 2016-12-28  4:12 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Will it be possible to add a new language to pandoc at runtime using
this (as that's something I couldn't work out how to do with in the
past when I needed it)?

On 25 December 2016 at 10:13, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
> For about a decade, pandoc has used my highlighting-kate
> library for syntax highlighting.  highlighting-kate used
> parsec parsers that were automatically generated from XML
> syntax descriptions for the Kate editor; this gave us
> coverage of a large number of languages in a pure Haskell
> library.
>
> Unfortunately some aspects of highlighting-kate's
> architecture weren't well thought-out, and the library
> persistently stumbled on syntaxes that include other
> syntaxes (e.g., javascript parts of HTML documents,
> or doxygen documentation inside C++ code comments).
> This wasn't easy to fix without major architectural
> changes, so I just released a new library, skylighting,
> that will replace highlighting-kate in pandoc.
>
> https://github.com/jgm/skylighting
> https://hackage.haskell.org/package/skylighting
>
> From the point of view of a pandoc user, the change
> shouldn't be noticeable at all; the same languages are
> supported, and things should work the same, minus some of
> the bugs highlighting-kate had.  But the new library is
> better-designed, more accurate, and easier to maintain.
> Current pandoc HEAD already uses the library, if you want to
> test it out.
>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/20161224231305.GA76841%40Johns-MacBook-Pro.local.
> For more options, visit https://groups.google.com/d/optout.



-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
http://IvanMiljenovic.wordpress.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ANN: skylighting - a new syntax highlighting library
       [not found]     ` <CA+u6gbyZ63Y1OfOUy3oDO3vtC1ykxUWMTmCtDw2vL+FGjMUtrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-12-28 15:14       ` John MacFarlane
       [not found]         ` <20161228151430.GA23464-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: John MacFarlane @ 2016-12-28 15:14 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Yes!  Not currently, but the library supports this and I'll
make it possible in pandoc (probably in 2.0).

+++ Ivan Lazar Miljenovic [Dec 28 16 15:12 ]:
>Will it be possible to add a new language to pandoc at runtime using
>this (as that's something I couldn't work out how to do with in the
>past when I needed it)?
>
>On 25 December 2016 at 10:13, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>> For about a decade, pandoc has used my highlighting-kate
>> library for syntax highlighting.  highlighting-kate used
>> parsec parsers that were automatically generated from XML
>> syntax descriptions for the Kate editor; this gave us
>> coverage of a large number of languages in a pure Haskell
>> library.
>>
>> Unfortunately some aspects of highlighting-kate's
>> architecture weren't well thought-out, and the library
>> persistently stumbled on syntaxes that include other
>> syntaxes (e.g., javascript parts of HTML documents,
>> or doxygen documentation inside C++ code comments).
>> This wasn't easy to fix without major architectural
>> changes, so I just released a new library, skylighting,
>> that will replace highlighting-kate in pandoc.
>>
>> https://github.com/jgm/skylighting
>> https://hackage.haskell.org/package/skylighting
>>
>> From the point of view of a pandoc user, the change
>> shouldn't be noticeable at all; the same languages are
>> supported, and things should work the same, minus some of
>> the bugs highlighting-kate had.  But the new library is
>> better-designed, more accurate, and easier to maintain.
>> Current pandoc HEAD already uses the library, if you want to
>> test it out.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/20161224231305.GA76841%40Johns-MacBook-Pro.local.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>-- 
>Ivan Lazar Miljenovic
>Ivan.Miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>http://IvanMiljenovic.wordpress.com
>
>-- 
>You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CA%2Bu6gbyZ63Y1OfOUy3oDO3vtC1ykxUWMTmCtDw2vL%2BFGjMUtrQ%40mail.gmail.com.
>For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ANN: skylighting - a new syntax highlighting library
       [not found]         ` <20161228151430.GA23464-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2016-12-28 15:37           ` BP Jonsson
       [not found]             ` <dc5f3c92-d99c-e4ac-90e1-1359832ff862-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-12-31  3:18           ` John MacFarlane
  1 sibling, 1 reply; 8+ messages in thread
From: BP Jonsson @ 2016-12-28 15:37 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

BTW I noticed that there is a syntax definition for vanilla 
markdown in the repo. I wonder how easy/possible it would be to 
extend it to cover Pandoc'svariety. Have you looked into that?

/bpj


Den 2016-12-28 kl. 16:14, skrev John MacFarlane:
> Yes!  Not currently, but the library supports this and I'll
> make it possible in pandoc (probably in 2.0).
>
> +++ Ivan Lazar Miljenovic [Dec 28 16 15:12 ]:
>> Will it be possible to add a new language to pandoc at runtime
>> using
>> this (as that's something I couldn't work out how to do with in the
>> past when I needed it)?
>>
>> On 25 December 2016 at 10:13, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
>> wrote:
>>> For about a decade, pandoc has used my highlighting-kate
>>> library for syntax highlighting.  highlighting-kate used
>>> parsec parsers that were automatically generated from XML
>>> syntax descriptions for the Kate editor; this gave us
>>> coverage of a large number of languages in a pure Haskell
>>> library.
>>>
>>> Unfortunately some aspects of highlighting-kate's
>>> architecture weren't well thought-out, and the library
>>> persistently stumbled on syntaxes that include other
>>> syntaxes (e.g., javascript parts of HTML documents,
>>> or doxygen documentation inside C++ code comments).
>>> This wasn't easy to fix without major architectural
>>> changes, so I just released a new library, skylighting,
>>> that will replace highlighting-kate in pandoc.
>>>
>>> https://github.com/jgm/skylighting
>>> https://hackage.haskell.org/package/skylighting
>>>
>>> From the point of view of a pandoc user, the change
>>> shouldn't be noticeable at all; the same languages are
>>> supported, and things should work the same, minus some of
>>> the bugs highlighting-kate had.  But the new library is
>>> better-designed, more accurate, and easier to maintain.
>>> Current pandoc HEAD already uses the library, if you want to
>>> test it out.
>>>
>>> --
>>> You received this message because you are subscribed to the
>>> Google Groups
>>> "pandoc-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from
>>> it, send an
>>> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To post to this group, send email to
>>> pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/20161224231305.GA76841%40Johns-MacBook-Pro.local.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Ivan Lazar Miljenovic
>> Ivan.Miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> http://IvanMiljenovic.wordpress.com
>>
>> --
>> You received this message because you are subscribed to the
>> Google Groups "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from
>> it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To post to this group, send email to
>> pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/CA%2Bu6gbyZ63Y1OfOUy3oDO3vtC1ykxUWMTmCtDw2vL%2BFGjMUtrQ%40mail.gmail.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ANN: skylighting - a new syntax highlighting library
       [not found]             ` <dc5f3c92-d99c-e4ac-90e1-1359832ff862-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-12-29 19:08               ` John MacFarlane
       [not found]                 ` <20161229190824.GC26701-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: John MacFarlane @ 2016-12-29 19:08 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I haven't looked into it, nor am I particularly interested,
but if someone else wants to do this, it should be possible.

+++ BP Jonsson [Dec 28 16 16:37 ]:
>BTW I noticed that there is a syntax definition for vanilla markdown 
>in the repo. I wonder how easy/possible it would be to extend it to 
>cover Pandoc'svariety. Have you looked into that?
>
>/bpj
>
>
>Den 2016-12-28 kl. 16:14, skrev John MacFarlane:
>>Yes!  Not currently, but the library supports this and I'll
>>make it possible in pandoc (probably in 2.0).
>>
>>+++ Ivan Lazar Miljenovic [Dec 28 16 15:12 ]:
>>>Will it be possible to add a new language to pandoc at runtime
>>>using
>>>this (as that's something I couldn't work out how to do with in the
>>>past when I needed it)?
>>>
>>>On 25 December 2016 at 10:13, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
>>>wrote:
>>>>For about a decade, pandoc has used my highlighting-kate
>>>>library for syntax highlighting.  highlighting-kate used
>>>>parsec parsers that were automatically generated from XML
>>>>syntax descriptions for the Kate editor; this gave us
>>>>coverage of a large number of languages in a pure Haskell
>>>>library.
>>>>
>>>>Unfortunately some aspects of highlighting-kate's
>>>>architecture weren't well thought-out, and the library
>>>>persistently stumbled on syntaxes that include other
>>>>syntaxes (e.g., javascript parts of HTML documents,
>>>>or doxygen documentation inside C++ code comments).
>>>>This wasn't easy to fix without major architectural
>>>>changes, so I just released a new library, skylighting,
>>>>that will replace highlighting-kate in pandoc.
>>>>
>>>>https://github.com/jgm/skylighting
>>>>https://hackage.haskell.org/package/skylighting
>>>>
>>>>From the point of view of a pandoc user, the change
>>>>shouldn't be noticeable at all; the same languages are
>>>>supported, and things should work the same, minus some of
>>>>the bugs highlighting-kate had.  But the new library is
>>>>better-designed, more accurate, and easier to maintain.
>>>>Current pandoc HEAD already uses the library, if you want to
>>>>test it out.
>>>>
>>>>--
>>>>You received this message because you are subscribed to the
>>>>Google Groups
>>>>"pandoc-discuss" group.
>>>>To unsubscribe from this group and stop receiving emails from
>>>>it, send an
>>>>email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>>To post to this group, send email to
>>>>pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>>To view this discussion on the web visit
>>>>https://groups.google.com/d/msgid/pandoc-discuss/20161224231305.GA76841%40Johns-MacBook-Pro.local.
>>>>
>>>>For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>>--
>>>Ivan Lazar Miljenovic
>>>Ivan.Miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>>>http://IvanMiljenovic.wordpress.com
>>>
>>>--
>>>You received this message because you are subscribed to the
>>>Google Groups "pandoc-discuss" group.
>>>To unsubscribe from this group and stop receiving emails from
>>>it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>To post to this group, send email to
>>>pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>To view this discussion on the web visit
>>>https://groups.google.com/d/msgid/pandoc-discuss/CA%2Bu6gbyZ63Y1OfOUy3oDO3vtC1ykxUWMTmCtDw2vL%2BFGjMUtrQ%40mail.gmail.com.
>>>
>>>For more options, visit https://groups.google.com/d/optout.
>>
>
>-- 
>You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/dc5f3c92-d99c-e4ac-90e1-1359832ff862%40gmail.com.
>For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ANN: skylighting - a new syntax highlighting library
       [not found]                 ` <20161229190824.GC26701-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2016-12-30 12:22                   ` Melroch
       [not found]                     ` <CADAJKhB3eTPfWVgFncwgBOSgPp9CYZZG95LL5ucFYGCdG8tfow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Melroch @ 2016-12-30 12:22 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 5892 bytes --]

I think I would like to have a go at it as and when I have time.

I found what seems to be the definitive guide at
<https://docs.kde.org/stable5/en/applications/katepart/highlight.html>

Do you or anyone else know how to include another syntax (assuming that you
can e.g. include blocks of CSS in HTML or blocks of YAML in Pandoc
Markdown)?

/bpj


Den 29 dec 2016 20:09 skrev "John MacFarlane" <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>:

> I haven't looked into it, nor am I particularly interested,
> but if someone else wants to do this, it should be possible.
>
> +++ BP Jonsson [Dec 28 16 16:37 ]:
>
>> BTW I noticed that there is a syntax definition for vanilla markdown in
>> the repo. I wonder how easy/possible it would be to extend it to cover
>> Pandoc'svariety. Have you looked into that?
>>
>> /bpj
>>
>>
>> Den 2016-12-28 kl. 16:14, skrev John MacFarlane:
>>
>>> Yes!  Not currently, but the library supports this and I'll
>>> make it possible in pandoc (probably in 2.0).
>>>
>>> +++ Ivan Lazar Miljenovic [Dec 28 16 15:12 ]:
>>>
>>>> Will it be possible to add a new language to pandoc at runtime
>>>> using
>>>> this (as that's something I couldn't work out how to do with in the
>>>> past when I needed it)?
>>>>
>>>> On 25 December 2016 at 10:13, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
>>>> wrote:
>>>>
>>>>> For about a decade, pandoc has used my highlighting-kate
>>>>> library for syntax highlighting.  highlighting-kate used
>>>>> parsec parsers that were automatically generated from XML
>>>>> syntax descriptions for the Kate editor; this gave us
>>>>> coverage of a large number of languages in a pure Haskell
>>>>> library.
>>>>>
>>>>> Unfortunately some aspects of highlighting-kate's
>>>>> architecture weren't well thought-out, and the library
>>>>> persistently stumbled on syntaxes that include other
>>>>> syntaxes (e.g., javascript parts of HTML documents,
>>>>> or doxygen documentation inside C++ code comments).
>>>>> This wasn't easy to fix without major architectural
>>>>> changes, so I just released a new library, skylighting,
>>>>> that will replace highlighting-kate in pandoc.
>>>>>
>>>>> https://github.com/jgm/skylighting
>>>>> https://hackage.haskell.org/package/skylighting
>>>>>
>>>>> From the point of view of a pandoc user, the change
>>>>> shouldn't be noticeable at all; the same languages are
>>>>> supported, and things should work the same, minus some of
>>>>> the bugs highlighting-kate had.  But the new library is
>>>>> better-designed, more accurate, and easier to maintain.
>>>>> Current pandoc HEAD already uses the library, if you want to
>>>>> test it out.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the
>>>>> Google Groups
>>>>> "pandoc-discuss" group.
>>>>> To unsubscribe from this group and stop receiving emails from
>>>>> it, send an
>>>>> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>>> To post to this group, send email to
>>>>> pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/pandoc-discuss/20161224231
>>>>> 305.GA76841%40Johns-MacBook-Pro.local.
>>>>>
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Ivan Lazar Miljenovic
>>>> Ivan.Miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>>>> http://IvanMiljenovic.wordpress.com
>>>>
>>>> --
>>>> You received this message because you are subscribed to the
>>>> Google Groups "pandoc-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from
>>>> it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>> To post to this group, send email to
>>>> pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/pandoc-discuss/CA%2Bu6gbyZ
>>>> 63Y1OfOUy3oDO3vtC1ykxUWMTmCtDw2vL%2BFGjMUtrQ%40mail.gmail.com.
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/pandoc-discuss/dc5f3c92-d99c-e4ac-90e1-1359832ff862%40gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/pandoc-discuss/20161229190824.GC26701%40Johns-MacBook-Pro.local.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhB3eTPfWVgFncwgBOSgPp9CYZZG95LL5ucFYGCdG8tfow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 9429 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ANN: skylighting - a new syntax highlighting library
       [not found]                     ` <CADAJKhB3eTPfWVgFncwgBOSgPp9CYZZG95LL5ucFYGCdG8tfow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-12-30 16:08                       ` John MacFarlane
  0 siblings, 0 replies; 8+ messages in thread
From: John MacFarlane @ 2016-12-30 16:08 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Melroch [Dec 30 16 13:22 ]:
>   I think I would like to have a go at it as and when I have time.
>   I found what seems to be the definitive guide at
>   <[1]https://docs.kde.org/stable5/en/applications/katepart/highlight.htm
>   l>
>   Do you or anyone else know how to include another syntax (assuming that
>   you can e.g. include blocks of CSS in HTML or blocks of YAML in Pandoc
>   Markdown)?

Sure, there are good examples of this in other syntax
definitions.  Just grep the xml syntax definitions for

IncludeRules context="[^"]*##

For example in javascript.xml you'll find

      <context attribute="Comment" lineEndContext="#pop" name="Comment">
        <IncludeRules context="##Alerts" />
        <IncludeRules context="##Modelines" />
      </context>

and

    <context name="JS content" attribute="Other Text" lineEndContext="#stay">
      <RegExpr attribute="Element" context="El Close 2" String="&lt;/script\b" insensitive="true" endRegion="script" />
      <RegExpr attribute="Comment" context="JS comment close" String="//(?=.*&lt;/script\b)" insensitive="true" />
      <IncludeRules context="Normal##JavaScript" includeAttrib="true"/>
    </context>

That last one includes the Normal context from javascript.xml.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ANN: skylighting - a new syntax highlighting library
       [not found]         ` <20161228151430.GA23464-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  2016-12-28 15:37           ` BP Jonsson
@ 2016-12-31  3:18           ` John MacFarlane
  1 sibling, 0 replies; 8+ messages in thread
From: John MacFarlane @ 2016-12-31  3:18 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

jgm/pandoc/issues#3334

+++ John MacFarlane [Dec 28 16 08:14 ]:
>Yes!  Not currently, but the library supports this and I'll
>make it possible in pandoc (probably in 2.0).
>
>+++ Ivan Lazar Miljenovic [Dec 28 16 15:12 ]:
>>Will it be possible to add a new language to pandoc at runtime using
>>this (as that's something I couldn't work out how to do with in the
>>past when I needed it)?
>>
>>On 25 December 2016 at 10:13, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>>>For about a decade, pandoc has used my highlighting-kate
>>>library for syntax highlighting.  highlighting-kate used
>>>parsec parsers that were automatically generated from XML
>>>syntax descriptions for the Kate editor; this gave us
>>>coverage of a large number of languages in a pure Haskell
>>>library.
>>>
>>>Unfortunately some aspects of highlighting-kate's
>>>architecture weren't well thought-out, and the library
>>>persistently stumbled on syntaxes that include other
>>>syntaxes (e.g., javascript parts of HTML documents,
>>>or doxygen documentation inside C++ code comments).
>>>This wasn't easy to fix without major architectural
>>>changes, so I just released a new library, skylighting,
>>>that will replace highlighting-kate in pandoc.
>>>
>>>https://github.com/jgm/skylighting
>>>https://hackage.haskell.org/package/skylighting
>>>
>>>From the point of view of a pandoc user, the change
>>>shouldn't be noticeable at all; the same languages are
>>>supported, and things should work the same, minus some of
>>>the bugs highlighting-kate had.  But the new library is
>>>better-designed, more accurate, and easier to maintain.
>>>Current pandoc HEAD already uses the library, if you want to
>>>test it out.
>>>
>>>--
>>>You received this message because you are subscribed to the Google Groups
>>>"pandoc-discuss" group.
>>>To unsubscribe from this group and stop receiving emails from it, send an
>>>email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>To view this discussion on the web visit
>>>https://groups.google.com/d/msgid/pandoc-discuss/20161224231305.GA76841%40Johns-MacBook-Pro.local.
>>>For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>>-- 
>>Ivan Lazar Miljenovic
>>Ivan.Miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>>http://IvanMiljenovic.wordpress.com
>>
>>-- 
>>You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
>>To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CA%2Bu6gbyZ63Y1OfOUy3oDO3vtC1ykxUWMTmCtDw2vL%2BFGjMUtrQ%40mail.gmail.com.
>>For more options, visit https://groups.google.com/d/optout.
>
>-- 
>You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20161228151430.GA23464%40Johns-MacBook-Pro.local.
>For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-12-31  3:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-24 23:13 ANN: skylighting - a new syntax highlighting library John MacFarlane
     [not found] ` <20161224231305.GA76841-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2016-12-28  4:12   ` Ivan Lazar Miljenovic
     [not found]     ` <CA+u6gbyZ63Y1OfOUy3oDO3vtC1ykxUWMTmCtDw2vL+FGjMUtrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-28 15:14       ` John MacFarlane
     [not found]         ` <20161228151430.GA23464-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2016-12-28 15:37           ` BP Jonsson
     [not found]             ` <dc5f3c92-d99c-e4ac-90e1-1359832ff862-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-12-29 19:08               ` John MacFarlane
     [not found]                 ` <20161229190824.GC26701-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2016-12-30 12:22                   ` Melroch
     [not found]                     ` <CADAJKhB3eTPfWVgFncwgBOSgPp9CYZZG95LL5ucFYGCdG8tfow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-30 16:08                       ` John MacFarlane
2016-12-31  3:18           ` John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).