From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28402 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: christophe dervieux Newsgroups: gmane.text.pandoc Subject: Re: How improve syntax highlighter parsing for new operators ? Date: Thu, 20 May 2021 06:17:46 -0700 (PDT) Message-ID: <414226ce-0150-4a82-a692-a185f483abeen@googlegroups.com> References: <63c327e2-daff-4e59-bb7f-e194f98dfd81n@googlegroups.com> <87o8d5y3ht.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_944_1825666140.1621516666446" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29758"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDDJDKUZ7QORB66CTGCQMGQERMCSZZQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu May 20 15:17:51 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f64.google.com ([209.85.161.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ljiYf-0007Wu-Og for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 20 May 2021 15:17:49 +0200 Original-Received: by mail-oo1-f64.google.com with SMTP id u3-20020a4ad0c30000b02901fef88716cfsf11181196oor.3 for ; Thu, 20 May 2021 06:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=gkbcfvdO1ap1HPEFrJ1JnOBbhuoQTnB+TPmbyCKozIs=; b=hw+IyI32qdFltx9lgIo/BC1utKctlBGdbWG40FmyMH7r5bWtHz4xEOImf0Fts12h5n B9r6PnL0KdyHv0ncWSvidFTPYt+ifLwo3vZpCX2MSp3U+qS6+vDS73dorK3Jfu8UNFv+ AId/J1N7PzUnmtwLKuyuBpOrO7t0xYHFzTUAndxHtXssTc1wgRbESQwL9i6AUjynFTkk koHHOIFVcxkEVWGJL2jmHh/hSdqhTFGJmkUNCiV14CKofimYbgB88n/GBPqk/i6CSra3 Czo7Af+RdTROJnfVNWiecA/59O0DxLJ0ihaGVJOPkVbhfKCOOvPz+kwrfg8sQIXT6ngb DFsQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=gkbcfvdO1ap1HPEFrJ1JnOBbhuoQTnB+TPmbyCKozIs=; b=DGzc5V4ifv9ESpOVnf3e/QLlgtyO83jHYyGfVz/4mtaTwbaqr1jHtYvw17XvCpWiHo tOcQpmxgXEjZRqJ32+r6G4cCIeo48GtN0L1G7SzOBZgWHiBqKWdzIJCmVa1w8VFO8u1v 47BixAm+oDez+7Rzh4VDdLKQgTsN5axLyzP9QUXZaa/yn0s3PLj3a7vvgUuo7D1mQjlg YhFtdr1GbecVRMptmvnepTvsVApZuL3pL6nJWTBCZu0mzMUm7e/pqUHIoB/fI6gkblPw k18xsoD95Rjo85XZgBOp9xhjcnDlCoLBP6EeBj5G7JWh0kxqr+bY2pvyCUyxGskF7vKy 3nrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=gkbcfvdO1ap1HPEFrJ1JnOBbhuoQTnB+TPmbyCKozIs=; b=VdruNC4mTcx2zTReBTsZxoKc2IdQPmQM5WBX+4mzzdQi3qm8kW/x1J7qSKqqHv6tHD 4uqYEIRtNi3oeG5UZRS6Qd9WMmircOcuvzLTjtCCqjzyumkT0xhAtWHP+jaxunGivNpQ aGpqQZJCpEjoKeEiuWLCfWdMDP48RNeGBsbyD3z9ijfIWkO+Vr+ZUhXEBu7yv61pzNse wb2Y+u2Un+OpB9CWj4hO6vzaigfNC/5m+a4gI1a9bMBdiVQSb7Nql6AdxAspUnltco5p 85rxoxe5A9m4nv/94gBk1pec+MinXYshj0vQC8g9GXhfBC/8qI/SgKzQBJkIr3yYZ6KF kSmg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533TOL3FufWs7OZE/WDkzE7tOBuZYHQkr57n77OW+cpXO/C6axDY mkAtnaMFlbTR6+Q63N/4jQc= X-Google-Smtp-Source: ABdhPJzD/LbdOLAQkplw15Jb9jJe25/+7c/mMA9UhYHA+NHp0VR5bMsDFtCsnVngnu1Dl4Hb0pIQJg== X-Received: by 2002:a05:6830:2248:: with SMTP id t8mr3835644otd.156.1621516668783; Thu, 20 May 2021 06:17:48 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:5c8d:: with SMTP id a13ls893969oti.0.gmail; Thu, 20 May 2021 06:17:47 -0700 (PDT) X-Received: by 2002:a05:6830:1db6:: with SMTP id z22mr3959130oti.312.1621516666985; Thu, 20 May 2021 06:17:46 -0700 (PDT) In-Reply-To: <87o8d5y3ht.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: christophe.dervieux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:28402 Archived-At: ------=_Part_944_1825666140.1621516666446 Content-Type: multipart/alternative; boundary="----=_Part_945_237992703.1621516666446" ------=_Part_945_237992703.1621516666446 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the confirmation. I'll have a look into KDE files then and=20 understand how to improve this. :)=20 Also using `--syntax-definition` will help ! Thanks. And will be a very=20 good way of providing backward compatibility. Thank you ! Le jeudi 20 mai 2021 =C3=A0 14:52:12 UTC+2, Albert Krewinkel a =C3=A9crit : > Hi Christophe, > > christophe dervieux writes: > > > I wanted to make sure on where to report or look at in order to improve= =20 > the > > Pandoc block highlighting. > > > > Recent version of R has added new operators. These are not recognized > > correctly when Pandoc is doing the highlighting. For example `|>` this = is > > now a single operator and not 2 tokens - Pandoc highlights the latter a= nd > > set two different classes, one for each token leading to two differents > > colors. > > > > I understand that Pandoc highlighting mechanism lives > > in https://github.com/jgm/skylighting but it seems the definition for > > parser lives upstream > > in https://invent.kde.org/frameworks/syntax-highlighting. I got that=20 > from > > the README. > > > > Is that right ? > > Yes, that's correct. > > > If I want to report an improvment request, or get help to make the > > improvement, should I go in skylighting or upstream and Pandoc will get= =20 > the > > update later on ? > > Going upstream first would be best, I think. A possibly interesting > point is also that you won't have to wait for skylighting to update, but > could ship an updated definition file with R Markdown, then feed it to > pandoc via `--syntax-definition`. > > -- > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > --=20 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 e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/414226ce-0150-4a82-a692-a185f483abeen%40googlegroups.com. ------=_Part_945_237992703.1621516666446 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the confirmation. I'll have a look into KDE files then and under= stand how to improve this. :) 

Also using `--syntax= -definition` will help ! Thanks. And will be a very good way of providing b= ackward compatibility. Thank you !

Le jeudi 20 mai 2021 =C3=A0 1= 4:52:12 UTC+2, Albert Krewinkel a =C3=A9crit=C2=A0:
Hi Christophe,

christophe dervieux <chri= stoph...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I wanted to make sure on where to report or look at in order to im= prove the
> Pandoc block highlighting.
>
> Recent version of R has added new operators. These are not recogni= zed
> correctly when Pandoc is doing the highlighting. For example `|>= ;` this is
> now a single operator and not 2 tokens - Pandoc highlights the lat= ter and
> set two different classes, one for each token leading to two diffe= rents
> colors.
>
> I understand that Pandoc highlighting mechanism lives
> in https://gith= ub.com/jgm/skylighting but it seems the definition for
> parser lives upstream
> in https://invent.kde.org/frameworks/syntax-highligh= ting. I got that from
> the README.
>
> Is that right ?

Yes, that's correct.

> If I want to report an improvment request, or get help to make the
> improvement, should I go in skylighting or upstream and Pandoc wil= l get the
> update later on ?

Going upstream first would be best, I think. A possibly interesting
point is also that you won't have to wait for skylighting to update= , but
could ship an updated definition file with R Markdown, then feed it to
pandoc via `--syntax-definition`.

--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/414226ce-0150-4a82-a692-a185f483abeen%40googlegroups.= com.
------=_Part_945_237992703.1621516666446-- ------=_Part_944_1825666140.1621516666446--