From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/88718 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Permissible characters in ConTeXt reference labels Date: Thu, 18 Sep 2014 00:18:08 +0200 Message-ID: <541A08A0.1010002@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1410992315 17118 80.91.229.3 (17 Sep 2014 22:18:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Sep 2014 22:18:35 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 18 00:18:31 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XUNYV-0000YC-DK for gctc-ntg-context-518@m.gmane.org; Thu, 18 Sep 2014 00:18:31 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 068A210222 for ; Thu, 18 Sep 2014 00:18:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id krdoWXGutksu for ; Thu, 18 Sep 2014 00:18:30 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 4DFA410223 for ; Thu, 18 Sep 2014 00:18:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 053A4101E7 for ; Thu, 18 Sep 2014 00:18:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 46NLbEz6mT5g for ; Thu, 18 Sep 2014 00:18:14 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id E1F9C101E1 for ; Thu, 18 Sep 2014 00:18:14 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s8HMICVp010397 for ; Thu, 18 Sep 2014 00:18:14 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.103; Original-Received: from [10.100.1.103] (unverified [10.100.1.103]) by pragma-net.nl (SurgeMail 6.5a2) with ESMTP id 8285-1713362 for ; Thu, 18 Sep 2014 00:18:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=Provincie Overijssel; city=Zwartsluis; latitude=52.6408; longitude=6.0694; http://maps.google.com/maps?q=52.6408,6.0694&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03MQmic6r - badaf0332cba - 20140918 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:88718 Archived-At: On 9/18/2014 12:06 AM, Mark Szepieniec wrote: > Bump... > > If it's not too much trouble, I would greatly appreciate some feedback > on this before I propose it to be merged into pandoc; even a "looks good > to me" from one of the ConTeXt gurus would be very helpful. > > Thanks in advance, > > Mark > > On Tue, Sep 9, 2014 at 12:20 AM, Mark Szepieniec > wrote: > > I'm trying to fix a problem in pandoc (see > https://github.com/jgm/pandoc/pull/1589) where it doesn't properly > sanitize the reference labels in ConTeXt output, causing errors > during compilation when a label contains '#' for example. Note that > this sanitizing is needed in addition to the regular backslash > escaping used for control characters: '\#' is still illegal in a > label for example. > > In the sanitizer function I'm writing, I'd like to properly escape > all illegal characters, but I couldn't find an explicit list of > allowed or illegal characters. Based on some testing I've conducted > (see attached file), I've arrived at the following set: > > \#[]",{}%()|= it depends on where these characters end up in # : always tricky as it denotes an argument, so escape [] : depends if it gets fed into a macro that uses [] as delimiters {} : only an issue when not balanced % : escaping needed as it's comment otherwise () : depends on where it ends up, like [] | : is special in context so needs escaping \ : of course that one needs escaping > 1) Does this look like a reasonable set? Are there other characters > or sequences that should be included, or are worth testing? keep in mind that escapes should end up unescaped at some point > 2) I was told (see > https://groups.google.com/forum/#!topic/pandoc-discuss/tYpXMUkmbEY) > that if the characters " and , didn't work, it would count as a > ConTeXt bug, is there any truth to that? Please let me know if any > further info is needed on my part. well, define bug ... one can say the same of < and > in xml -) if the result ends up in a comma separated list then , can be an issue but one can always wrap an argument in {} to hide that > 3) Does anyone see issues with this general approach? I'm relatively > new to ConTeXt, so I might be missing either a huge problem, or an > obviously easier way to do this. i don't know ... i never used pandoc input Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________