From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32299 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Determining that a Pandoc Variable is the Empty String Date: Tue, 7 Mar 2023 20:44:20 -0800 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.2\)) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20830"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBKFFUCQAMGQEJRHXYJA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Mar 08 05:44:29 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pj1-f64.google.com ([209.85.216.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pZlfA-0005Dd-Q3 for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 08 Mar 2023 05:44:28 +0100 Original-Received: by mail-pj1-f64.google.com with SMTP id a6-20020a17090acb8600b0023797a1b2f7sf392822pju.3 for ; Tue, 07 Mar 2023 20:44:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678250667; cv=pass; d=google.com; s=arc-20160816; b=ZqYF6/Am9gT+G2+GFBiaa+uE2okr5daH1VlKGdtqJ9rlceCWaSoj8Gmhb2O4kWA5+9 SXoGrgrgiLFU9nurN+RkoConFFIP2tp8E3ScOo3md3ObbiEhlnI228MlMQXBnGKbXGqj PTWLRwLoCC6uOeVRsqa/UzKT28rToLU8Tkelz9sGNT8r6X6aMx1YHvsn/y1g1rDNlf/m n/RxETjSc2KlDjp2HCj+WSeTrz/ilyHdKy923vVJgvOFyoPsNcar089RtSS6N7Te92Q7 DXuv2B7WwAf1uEpFJLrAoeB8hAw+kqjvG1r+2rI4paYrV9+2GKT3PJtHmMl9UG4mYhGp a+8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:message-id:in-reply-to:to :references:date:subject:mime-version:content-transfer-encoding:from :sender:dkim-signature:dkim-signature; bh=KdawNJvURaugGE6PYZIEKMKIfYCBMcpHjlY2jwvnFSE=; b=hU6hhxSPXWSrh5tROD95GhedVAHGIlHGa7Bmst2sy0ldsU0FKOoAmMg6RDQYQv5tkw rVJ3m9RVd4qeK0wbzVvmfKEERxe3xxGqogr51w6I+Tvoc5cn7vIa7JsWpXfBxN+nlEpg MUtYwnKVduboUlN3GwagHizPQ62zYQNipMP0jUvD5+x6uyTeBL1QWKYua1glLYEwdE2S fbL7Kah2lGJVte7BS8igWEndzw1dTX4q8S4PRHiiHOSWSHGoxIbgIGTntE/JAkpQis80 55CAl/yIEJRK8dNe4ZAuf7oPiRzgE50W0R2xhuhc6ZB6avEhI0YRr57KiefCF5ulg3Uy qsyw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=h0xrPQJh; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62c as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1678250667; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=KdawNJvURaugGE6PYZIEKMKIfYCBMcpHjlY2jwvnFSE=; b=m1AxwB++BH6JNOjOeqypvnOJRoKHBuqbuFEj/o9DGyNbnoXldr5O0UUf/XyQ6XgB5s nAiEiJdSv+gUVd6jTQqc/ReaHEU/hWxwo4SX4O9TBFGBaPrPaWK0SjCWqBGM76vQb1zi WZFmSEz09ww2xPAHhQGGlaQxLD6o09A9s2qzUKOxz5PLna4ewiC20J57PTlwqJpJaj9Z BsO4tqSMMkwbBpOS4WvNqiKhqB/DrnJQ2AaDyU73NG/puhNF7xFOjiWbVaXzs4cEvHod Iyl3axIsd0/8Nl2VQ4uLodgVLNOznCfSd9/HsZOEnXFlc0gDfyH DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678250667; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=KdawNJvURaugGE6PYZIEKMKIfYCBMcpHjlY2jwvnFSE=; b=Xlf9Wc8HQNfQiWeDosQaGvoc3Lpd75/IWgfRO2xCrYBZfQ9WOYzdTsoJhkVep68+iW N9/sTK6A6yKSh5VDZWQ2Uzr+g6rejL+4hkJkE4HGpnVfm78mEhxRwGsTYmx2wB0dWt7l fWU5zqr9gbxlipe1jWi29zC4nXbXQpd2gcQU6JVos6kPiahAwdGHwAgmVDfSC752gIvA //pJYwg3dALYFT2n4KFb5TEAtZNdwrR0lPAvwHT/eDYbUxP7evxYZ/9/+0ODVNRsZJ6J g9D1C1ggt2m7HRMvZoH6cHbbYdOtvs/RUrbCaBi1Qi1xrYVJifoCmjFCnVlJCaSJw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678250667; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=KdawNJvURaugGE6PYZIEKMKIfYCBMcpHjlY2jwvnFSE=; b=QkUPSeG61Uv+QLmbrSq8RWiKl7mDQ86ZSl9HGtmrReQ0bTIVCFTZzzWfPQPuFFvKV/ Sf3MjEItz/cBk2Lq9JQcm7aEnEppwGnAk5S1Hqbr7pjV/9WQHH3MtXtMAvNvgfOwVVUj 5Ec3gGsetbkXdr3hAmF/66UfH5pfMSVFb4tm55RVllRFOT7ykt0MveFQEYyvNg/+T40i zdXny5kp6vIv/LfEEUflQ4Aul1znR+gA6RVR6F5gChY6hWm8caujRXwd9mjBbgQwePrj VO7+6K Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKVb6fB11+FHw3Vy6sAk1QLnggcUEnHa/6R4Q2jU0u3uRjH2WiSO AGKjFaVigHyGIa5G/Jd4DBw= X-Google-Smtp-Source: AK7set/LYwLMYc9dmN9SUld7XBld8jM7fX7sQAYj9veBDpdPlwt8T2O4qUM0o3tEeL34iir907WT3A== X-Received: by 2002:a17:90a:d342:b0:22c:89b:8e97 with SMTP id i2-20020a17090ad34200b0022c089b8e97mr6300269pjx.1.1678250667228; Tue, 07 Mar 2023 20:44:27 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:90a:205:b0:210:6f33:e22d with SMTP id c5-20020a17090a020500b002106f33e22dls782122pjc.2.-pod-control-gmail; Tue, 07 Mar 2023 20:44:23 -0800 (PST) X-Received: by 2002:a05:6a20:a5a8:b0:cd:36d:90fc with SMTP id bc40-20020a056a20a5a800b000cd036d90fcmr17142175pzb.41.1678250663448; Tue, 07 Mar 2023 20:44:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678250663; cv=none; d=google.com; s=arc-20160816; b=cVsXlv08phKl1R+kxUZi7yITe8W/tSxKBNBmPWxb5gZL5lcP5Sqdyr3BRmBNDRebbL beshuAh4TtKU9NeGu6vUjnBu8qIKYOfOiwxRNtpmsgeEMQ5Z929ar7KCmwI8GksMKLKq f9gH3PbKMf+6btIXJYvzrtwUTBpeIUCnVDXxxUnuqc/YQv4XTkh7armBnJb41eg4032j I/9LE7LCj09kIg3uf09/4kdypjyIvnGWCCxFwbB0BPqDhsSHy1YPi7+71j3DeVokV+CC NaUskrxnCV7rXgEUDZpHSNBk10LMj871S9Xq27kbXO1GweypPh8pGvhRrD7tjsHIg4tC /DvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=FhmUdY6n83kjeghRFvN89gUu0Ifup8RrCAg920KFtlU=; b=IgcuUpherOp14OndFvGxZg5hWGiZ2qirDpgnCfyoilEmBILwZqOn+yzi5iCHT3Hb2C UtEgaQDu0OwPCXjBqRHVgyfQPIBUzQuZeDo2xr0TDfesYhprckb6dGoC1ZPm0kYsvlQV lnO/RLCGZ06JGGUrIB//Jy83Jbx8diopbU1SoYSX8ekA/X9Xv0CSKJ3cryn0GKXY0RDJ qONWY6/7dv9LNQKaHFDr/O/K49NndZ3UEPu0pSYdDafIVYkvLl9599vdsRYJSbizRbGR tLG+VD45qN9/n8MWSnerXvlAjCrkflmDxwDOSmvPbh6EGeyEJzloxfHI0KPBkur1RggA 132A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=h0xrPQJh; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62c as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com. [2607:f8b0:4864:20::62c]) by gmr-mx.google.com with ESMTPS id x4-20020a655384000000b004fb840b5440si726759pgq.5.2023.03.07.20.44.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Mar 2023 20:44:23 -0800 (PST) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62c as permitted sender) client-ip=2607:f8b0:4864:20::62c; Original-Received: by mail-pl1-x62c.google.com with SMTP id ky4so16595784plb.3 for ; Tue, 07 Mar 2023 20:44:23 -0800 (PST) X-Received: by 2002:a05:6a20:918a:b0:c7:249:cd8c with SMTP id v10-20020a056a20918a00b000c70249cd8cmr17318522pzd.5.1678250662788; Tue, 07 Mar 2023 20:44:22 -0800 (PST) Original-Received: from smtpclient.apple ([2601:644:4780:3350:7ccc:e55d:b6fc:19da]) by smtp.gmail.com with ESMTPSA id 1-20020a630301000000b004fb11a7f2d4sm8466443pgd.57.2023.03.07.20.44.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Mar 2023 20:44:22 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.2) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=h0xrPQJh; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62c as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:32299 Archived-At: Try tags: [] in your YAML if you don't want the for loop to be executed. > On Mar 7, 2023, at 8:41 PM, S. Manning wrote: >=20 > I would like to add a tag system to my static site which I generate with = Pandoc templates. Adding a tags: variable in myPage.yaml is easy, but then= I want to add links from pages with the tag to the page for that tag. Cod= e like: >=20 > $for(tags)$ > =E2=87=90 back to $tags$<= /a>  > $endfor$ >=20 > adds a link even if the tags variable is empty ("tags: " in the YAML file= ). >=20 > How can I check that the tag is not empty or a null string or however Pan= doc defines it? >=20 > https://pandoc.org/MANUAL.html#interpolated-variables alludes to variable= types such as string and list, but does not define them or explain how to = get the attributes of complex variables such as lists. >=20 > --=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= email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/baea52e4f4b9a22d832faa30ab3fd116%40ageofdatini.info. --=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/DA455835-3B72-4022-A761-E7A96E904EEA%40gmail.com.