From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31315 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "'amindfv-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org' via pandoc-discuss" Newsgroups: gmane.text.pandoc Subject: Re: Escape characters silently truncate other text Date: Tue, 30 Aug 2022 14:59:09 -0700 Message-ID: References: <3EC2D4C1-EA11-46E5-A000-363461CD8A29@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 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="26356"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBC5OZYN6SQHRBNEQXKMAMGQERU75VMA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Aug 30 23:59:21 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f55.google.com ([209.85.167.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oT9GT-0006hI-A9 for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 30 Aug 2022 23:59:21 +0200 Original-Received: by mail-lf1-f55.google.com with SMTP id m14-20020a056512114e00b004947fa33acesf446921lfg.2 for ; Tue, 30 Aug 2022 14:59:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661896760; cv=pass; d=google.com; s=arc-20160816; b=JPz9AxdLDp2TT8+OBWN++tihvF0Vfm84N7HuQqVHyCZO+ZLez8orq/WOExzDrWe7ux tYiw7OZWNAFExv648I7uEdMYtqwM0ZRAGD0+HtsMa9ZRISw8Hh8E2gQNPat6gmUQ6tqu 53OI6mfcg+7d18NCMlQC0ObZBBMa5kL8spGX0AYy2z/02tic5T5cYI4KERPwl8UEdROb GQoabxJdaVQ/MnlkstX21JhJwm2KjSeaDzueBjDQAG5qAe727DZCipp8egxYDH/4AvIw dzKEiCD5K/QXQDZYZogUqJC0swGzh8+mZO0hLhUxvJYeFKuiO1GP7mSckYu9HBIDA1cb 1igw== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=FD+A9caJZ69OXf3FvjpA5BIATRXoOBfZw7B6D4Bk/cU=; b=U661SHXOBrZXUXLP4UsiQFu/SUYt99D+AMzLlhpAphDuS27/BNsW/e7ib0w+D0dG1C hPWZPtJHEzbBBrUY4XQ/Tn8axR9ysDddtfaeiCS5BAXoFTKcCuKY5iJdlRQl8o5mRw6D YytwRdQBMtaVpe4T2Pz21CQ8yW/iAX4ujZapWd0rGYwIEd7y56QyA7nB7sUsgKlA1A1u C2Ln23mgEcWiv7ndZ7m7e483Ds18RN9MPYCn8GZaUiqjJWDUnYZBcbI2PO/4fWgr7iE5 0fhEhx0qTp4G3crAU7hZjHJvpd0RBOnSI+GbugPJPU6mpBI3uHJg/6Lc/lzBVJnLDjnm C/vQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=p2BxUlB+; spf=pass (google.com: domain of amindfv-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 80.241.56.151 as permitted sender) smtp.mailfrom=amindfv-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:from:to:cc:subject:date; bh=FD+A9caJZ69OXf3FvjpA5BIATRXoOBfZw7B6D4Bk/cU=; b=FQUh63myfIrzDtLkRlhGaMIQ4ePpbUHEapVibfD0Vk6+MqsOwHHEnYCIumsZ+6Xly/ fmzcWaWcxmAtKT8gHSf3a+fcNlabed84KAN4d7QRAQbmK0blc2oQeXV3DlQiDC9933vA ACvPc6VZueCJ08Kr52u+Cfpv+CqcYrR2LkL38mxFiZ7rokJ1yiCWMHjvze2XNCkb4Qrr aBL6GE/DtY/sD5wJScP4qbj4zpVFTnG394sbe7f5b3aN3n/k59bmzvRDX8V3pDbNly7R EtdTd2kLwVY+ZzOC9gKXVWjuNzc1Iz8k+In7+1H0Frbl1FhVgdERaOS5J4tQWQGqK0+A Q1IA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-gm-message-state:from :to:cc:subject:date; bh=FD+A9caJZ69OXf3FvjpA5BIATRXoOBfZw7B6D4Bk/cU=; b=YnuoJAapMUoH9ecg61D3w9zqHyM8LOcHTlQN6tDNjNikWwi82lM2jHHc3OeipsO63S bQoJhUhEz+5a4Rq9jovyY1eASuykDR3QWmB1xVNBv9nNCGg2mfXJDOkXAqflmVJBsD6b aT5zoHRhxWtrsU41URT6ximvqvuFahKnB3x1nZL4WG537JlShn+4zv0DIMw8vfOKdldF O7Hdl7gmeTPfr0ykzzSjZbrFR+X02l6LDHuL2kDyZzwCQIrOhu+0y1t8Fz2Hypb80kjN KDwh53WAIWzwQLIf/yukKVeiIAg X-Gm-Message-State: ACgBeo16qMkbqsM73vwgIv4A46FNFgt7eVOmSpE4uzUNd1pquV/QlzZx ZsPgwm/bXCOjDz4p9Eb8wCo= X-Google-Smtp-Source: AA6agR5Rgo7CvZRRbB6RNxNfyuoAMSMV9Ii5amimUaem1K686RD2SHkDMSLI9bwmiqC2mqAuMLX+6w== X-Received: by 2002:a2e:9ec8:0:b0:265:ef3:b74b with SMTP id h8-20020a2e9ec8000000b002650ef3b74bmr3825705ljk.297.1661896760721; Tue, 30 Aug 2022 14:59:20 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:a612:0:b0:266:7435:63ce with SMTP id v18-20020a2ea612000000b00266743563cels906799ljp.4.-pod-prod-gmail; Tue, 30 Aug 2022 14:59:15 -0700 (PDT) X-Received: by 2002:a05:651c:54a:b0:261:e131:6496 with SMTP id q10-20020a05651c054a00b00261e1316496mr7393262ljp.281.1661896755132; Tue, 30 Aug 2022 14:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661896755; cv=none; d=google.com; s=arc-20160816; b=LqxFh5JLQO/0x94pLj6EgNV6nknl11lSsYBH6gMElN+loZey7iMhVLKwAc4oMkr8b2 zqHi3sDWgW+O+4mdx5w93fNpQ5128bFaO0moTi87gvS83I/qSHVxdgvzZ/JWCU6J8PNH wlzf/7xGm+zMBZf+i8vAE4o6tVN9NqyTRHg4d9XGrh6cOYJIU9IbGS+8tXiDdBRxRjVd N0FRJsBUC5QdYs/9CK2ZLgQ9C4rEjwZc4DjYgw1B4STcMSYjlm7UEBoB+ySdhmcwuw5r Eb5ZMql7IgAITw1vyiWDoUDX1H3YceHsczk7bKBwLDx9KNCfNvM6shI0VgD+akxvsewv xHhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=1D4gX5uVEZ3yvbJuWEVNwQjw9BtJywHgSyo0CbGXyUE=; b=MGVfvQ5kg+06O16Ufdm+SQgPYPDXrRLE6IzX5WxrgAXnhSkvsy88sADJlZPigapkg+ F2Ecia65DyRRT+rKh3U5P3u2iP7rGJPQDp4MqiknrlUiZwqdMhDG2rWFmhKayQ5saTEy tCItYI1djhudYIVjpqgm86utK1ZCaP6GdvzPB6D6Hz5KzqkwD8s9+zY+pKfb6uLOfAAX qnrH/wLdjfhWjNMH/cP3ER66m1clp1AnxkqVEiyI3lxX0JvJVJCYDOwOkxdLYiafjezy yOi4IIw8EBZ5P03Bc7XBwaaFSdJS2yhl1fRgSnxzlMnNjMX9cCO1Jg2Dz/n+Us9CUBws OBfw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=p2BxUlB+; spf=pass (google.com: domain of amindfv-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 80.241.56.151 as permitted sender) smtp.mailfrom=amindfv-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Original-Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org. [80.241.56.151]) by gmr-mx.google.com with ESMTPS id i22-20020a2ea376000000b0026187cf0f12si553846ljn.8.2022.08.30.14.59.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 14:59:15 -0700 (PDT) Received-SPF: pass (google.com: domain of amindfv-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 80.241.56.151 as permitted sender) client-ip=80.241.56.151; Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4MHLmw1ZMTz9sWw for ; Tue, 30 Aug 2022 23:59:12 +0200 (CEST) Content-Disposition: inline In-Reply-To: <3EC2D4C1-EA11-46E5-A000-363461CD8A29-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> X-MBO-RS-ID: 7b7075df2ccc0c7b6dc X-MBO-RS-META: 5cfmfx7gx5wzfzojepjm4hzjmfddnwp1 X-Rspamd-Queue-Id: 4MHLmw1ZMTz9sWw X-Original-Sender: amindfv-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=p2BxUlB+; spf=pass (google.com: domain of amindfv-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 80.241.56.151 as permitted sender) smtp.mailfrom=amindfv-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org X-Original-From: "amindfv-cl+VPiYnx/1AfugRpC6u6w@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:31315 Archived-At: I'm confused about this for a couple reasons: 1. The silent truncation: I'd understand if I'd written `here's a string = "with a\nequator"` and gotten back `here's a string "with a=E2=89=A0uator"`= , but it's much more disturbing to have a single backslash to cause any fol= lowing text to disappear 2. raw_tex seems not to actually let me use raw Tex... e.g. $ cat /tmp/foo.md=20 here's a string "with a\nnewline\ncharacter" =20 what happened to the other stuff? =20 \emph{this also disappears} =20 This is fine, though: $E=3Dmc^2$ =20 \this_isnt_latex =20 This is: \neq =20 $ pandoc /tmp/foo.md -o /tmp/foo.html $ cat /tmp/foo.html=20

here=E2=80=99s a string =E2=80=9Cwith a=E2=80=9D

what happened to the other stuff?

This is fine, though: E=E2=80= =84=3D=E2=80=84mc2

_isnt_latex

This is:

To me it'd be much more "principle of least astonishment" to only have raw_= tex handle commands it understands (and then output them), not consume a lo= t of text and output nothing. Thanks (and thanks for Pandoc in general!!), Tom On Tue, Aug 30, 2022 at 02:10:12PM -0700, John MacFarlane wrote: > pandoc -t native will tell you. > \nnewline is being interpreted as a raw LaTeX command. >=20 > You can disable this by doing `-f markdown-raw_tex` >=20 > But a better approach is to put code like this in backticks, which guaran= tees that it will appear literally. >=20 > > On Aug 30, 2022, at 2:04 PM, 'amindfv-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org' via pandoc-discuss <= pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> wrote: > >=20 > > I've come across what seems to be an unusual bug; one that caused a ver= y tricky bug elsewhere in a larger program: > >=20 > > $ cat /tmp/foo.md > > here's a string "with a\nnewline\ncharacter" > >=20 > > what happened to the other stuff? > > $ pandoc /tmp/foo.md -o /tmp/foo.html > > $ cat /tmp/foo.html > >

here=E2=80=99s a string =E2=80=9Cwith a=E2=80=9D

> >

what happened to the other stuff?

> >=20 > > In other words, after the appearance of a "\n", everything is truncated= on the first line - except the closing quote! > >=20 > > Tom > >=20 > > --=20 > > You received this message because you are subscribed to the Google Grou= ps "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/ms= gid/pandoc-discuss/Yw57XcTYQBSq80ME%40painter.painter. >=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/3EC2D4C1-EA11-46E5-A000-363461CD8A29%40gmail.com. --=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/Yw6ILcBFMakgvnrd%40painter.painter.