From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29806 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" Newsgroups: gmane.text.pandoc Subject: Normalize adjacent Emph separated by Space? Date: Thu, 16 Dec 2021 17:25:09 -0800 (PST) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_396_843783315.1639704309701" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20811"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCS252WXTEIBB56N56GQMGQEFF2KKRI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Dec 17 02:25:14 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f58.google.com ([209.85.161.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1my1zm-0005ES-8A for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 17 Dec 2021 02:25:14 +0100 Original-Received: by mail-oo1-f58.google.com with SMTP id z48-20020a4a9873000000b002c29a99164csf471334ooi.20 for ; Thu, 16 Dec 2021 17:25:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=g57lWdruQ0leWwOc9pQ7BLvMpaJogpvQHSlNdG13dw0=; b=QIUv609x5gkVRslv7t8qPszJw9ySjZZ1QdFzdB+X9SwqVW9c2z2QRZrsOI1fcTRpkZ gc3wJ4XeW0ToExOq45sRoAEF+suFOl307AGXWc+FjhFOyxakVh+ivvYGw2aIiONsDe8z 7o/KORK8M0SG0FEHYGyq5/1rkD2y6heGnRPsaWRQL9wQiYm9/DUhS/zKiMwmXjX60zvS /DEDcBQpjE2pZ7uHPDhK6brEK4yRB1xg5ItT5aRZ+mm1w+QhxkpLtxCuxkcooDM/cLhR fJIC+hTZrP/q4dZ8IM38cEL1vKsypxp/Qoz257wwmGXxLh83poRrx2+YsBECabL9zd77 Iu5w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=g57lWdruQ0leWwOc9pQ7BLvMpaJogpvQHSlNdG13dw0=; b=X9X8G0Xx+JQ9Ubf4o+TU7McyJCoaleWjBXRTQ+W37xWEqABKNidQLuylvqEtIwHlyN ynRuhzCz95Oyd1Vve+vIRHRCKa0jaIjt+IS8acdT6EB8XGnD80zT6ChXb/0EGCIsRqzG rSkNUs8x6XvmDZO6dB7MA31+qtMlHIWxzTY713+WnJ43ohvkHZ966xzkXTVRi4UpjcP6 k4YFx049B06wNNpKABdnb5DS67EmLTqKozEruOA1k+WbC+XT6h/4l9S0WQpvEHPwgHRt xGg905x0/8l/HjOi/0x5TjR65UgpgZy7NsyjntydEjd3BRio/esg2ojROqTeS3JoIwoX fGZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id: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=g57lWdruQ0leWwOc9pQ7BLvMpaJogpvQHSlNdG13dw0=; b=bAmmEBTSYubd5RgSSgbLlWgM6m/NtY7dn5sFbbUzj+MTUP/oR8GKxdSC8AG1i/Dx/a N3J3C/3tZkx/RVFp4Yh8K8ZylzZdoAzt7jLPpCd39hwKyZLNI9sEGNtfvEMZEjHBPHvJ oNUj/S78QFVQB7TPunpS/+4l4dvvBVFYlcrEpr2JX/b5dF8/6lk9bteRE1RCSNPKd21Z x6AXUlrO/43hgwgpoVr3VR+tFdettK3+xva68go2bCrPoWRb2HpNdUpJCEzI7C0sQOyu kHDM0ldKsqIcCY8heak/4PhfNr1R8JuYKzFBjEt03ep4ISieBV+kN156UF8/Xx4IkPOW QLxQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530Ec//4jPyisRk6zYFvUz25wh/ifiZa2QfQIUl2GgquMh3ror1w SR6R3BEktEaN1DkCAEHopDk= X-Google-Smtp-Source: ABdhPJwdjH4vvB3r1K+9X0u63XZjwZXEhZGt4hy0VBHKC0wtLMYion05e93U2nSM4tJvoYsVVU/jEA== X-Received: by 2002:aca:2207:: with SMTP id b7mr6460164oic.24.1639704312655; Thu, 16 Dec 2021 17:25:12 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:2b22:: with SMTP id l34ls1733992otv.1.gmail; Thu, 16 Dec 2021 17:25:10 -0800 (PST) X-Received: by 2002:a9d:6a15:: with SMTP id g21mr577966otn.221.1639704310274; Thu, 16 Dec 2021 17:25:10 -0800 (PST) X-Original-Sender: christian.kolen-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:29806 Archived-At: ------=_Part_396_843783315.1639704309701 Content-Type: multipart/alternative; boundary="----=_Part_397_70780885.1639704309701" ------=_Part_397_70780885.1639704309701 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I recently have a situation that I want to have adjacent Emph separated by= =20 Space to be =E2=80=9Cnormalized=E2=80=9D, combined to a single Emph. (And v= ariants like=20 this.) --normalize is removed in=20 https://github.com/jgm/pandoc/commit/8165014df679338d5bf228d84efc742c5ac39d= 2=20 and I=E2=80=99m not sure if it is related. Example: $ echo "*text* *abc*" | pandoc -f markdown -t native [ Para [ Emph [ Str "text" ] , Space , Emph [ Str "abc" ] ] ] Is there someway to make it [ Para [ Emph [ Str "text" , Space , Str "abc" ] ] ] ] Instead? Another example is (perhaps generated in a filter) [ Para [ Emph [ Str "text " ] , Emph [ Str "abc" ] ]] Is there some way to normalize it to [ Para [ Emph [ Str "text" ] , Space, Emph [ Str "abc" ] ]] When I say =E2=80=9Csome way=E2=80=9D, preferably it is some pandoc flags (= for example=20 native to markdown then markdown to native is not reliable for the space=20 problem above and won=E2=80=99t work to merge adjacent Emph), but even if w= e=E2=80=99re=20 talking about doing it in filter, how to do things like this reliably? Thanks. P.S. Even for [ Para [ Emph [ Str "text" ] , Emph [ Str "abc" ] ]] won=E2=80=99t be normalized: $ echo '[ Para [ Emph [ Str "text" ] , Emph [ Str "abc" ] ]]' | pandoc -f n= ative -t native [ Para [ Emph [ Str "text" ] , Emph [ Str "abc" ] ] ] But the text in the commit message seems to suggest it should: normalization is handled automatically by the Builder monoid instance. (But the commit is old so may be there=E2=80=99s more to it in the later co= mmits.) =E2=80=8B --=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/c887615c-9a1e-40a5-b6b0-a7bf22c87350n%40googlegroups.com. ------=_Part_397_70780885.1639704309701 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi,

I recently have a situation = that I want to have adjacent Emph separated by Space to be =E2=80=9Cnormali= zed=E2=80=9D, combined to a single Emph. (And variants like this.)

--normalize is removed = in https://github.com/jgm/pandoc/commit/8165014df679338d5bf228d8= 4efc742c5ac39d2 and I=E2=80=99m not sure if it is related.

Example:

$ echo "*text* *abc*" | pandoc -f markdown -t native
[ Para [ Emph [ Str "text" ] , Space , Emph [ Str "abc" ] ]
]

Is there someway to make it<= /p>

[ Para [ Emph [ Str "text" , Space , Str "abc" ] ] ]
]

Instead?

Another example is (perhaps = generated in a filter)

[ Para [ Emph [ Str "text " ] , Emph [ Str "abc" ] ]]

Is there some way to normali= ze it to

[ Para [ Emph [ Str "text" ] , Space, Emph [ Str "abc" ] ]]

When I say =E2=80=9Csome way= =E2=80=9D, preferably it is some pandoc flags (for example native to markdo= wn then markdown to native is not reliable for the space problem above and = won=E2=80=99t work to merge adjacent Emph), but even if we=E2=80=99re talki= ng about doing it in filter, how to do things like this reliably?

Thanks.

P.S.

Even for

[ Para [ Emph [ Str "text" ] , Emph [ Str "abc" ] ]]

won=E2=80=99t be normalized:=

$ echo '[ Para [ Emph [ Str "text" ] , Emph [ Str "abc" ] ]]' | pandoc -f native -t native
[ Para [ Emph [ Str "text" ] , Emph [ Str "abc" ] ] ]

But the text in the commit m= essage seems to suggest it should:

normalization is handled aut= omatically by the Builder monoid instance.

(But the commit is old so ma= y be there=E2=80=99s more to it in the later commits.)

=E2=80=8B

--
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/c887615c-9a1e-40a5-b6b0-a7bf22c87350n%40googlegroups.= com.
------=_Part_397_70780885.1639704309701-- ------=_Part_396_843783315.1639704309701--