From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32232 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JDTS Newsgroups: gmane.text.pandoc Subject: Lua filter to fix incorrectly nested lists? Date: Sat, 25 Feb 2023 06:26:04 -0800 (PST) Message-ID: <163effbf-b672-4501-9171-8c4681034a96n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_580_212050843.1677335164043" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40939"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDEZRENAQYORB7NU5CPQMGQEQQ4IVRA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Feb 25 15:26:09 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qk1-f183.google.com ([209.85.222.183]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pVvV2-000ASK-Ow for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 25 Feb 2023 15:26:08 +0100 Original-Received: by mail-qk1-f183.google.com with SMTP id y1-20020a05620a09c100b0070630ecfd9bsf1191842qky.20 for ; Sat, 25 Feb 2023 06:26:08 -0800 (PST) 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-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=PSbGtkZHZHSPvzeFbyrM3Eb//WItKcmMJR2fop99ebQ=; b=K0CQ10wkMzyLzgXKv6li50MQBQUu+JgoU+O/qGtvAgNhfpxBxdeUSjehG1XaPuBUBy lVJFtDFTu0oDjK1VxHe2kXsSWo2DzMkvVaylwZmjJKj5ww9LzWhD/gAXfGIWvTP2k/2x Y2Vj7XSLyHCx/QjXP7n9f+OM52QRBdJeIiLHLA9JwpjXWI2cu3FtQMbp26E86jo5cHp5 Ydwx10uss+FLSwR9euypwG4oSzYJDFK25yf1CnrvJQu/QGlSoLzHXBtv3hLwr5+B+drZ vjKBUl1Etpvdb841KOxuKOfcDmxIfr1Y3EpboELwwYy6ba/yTmAJkilCgL9dk7HQ7/WX HsyA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=PSbGtkZHZHSPvzeFbyrM3Eb//WItKcmMJR2fop99ebQ=; b=EDYImVvJmrdgdwvywzi94Yh9Tf2ztyGh4E12k0t5FfvCm0Bpbwtx3skDFexIxV0dtj fl2X1Mbdb+wfM/p+VDF5oJfuKNgT03qJftMlcLaTGtg/RvtT10NKSur5OZKhTo5R+k/9 YiLd4Pw1KYiV3X7DoK3zwYtxIS/5cOQFCS6tdqkctxH/O/3mNX27/gHpLZOs8+uKKIM7 B9QGXgxuIG3qiZ4cg24xNaWbjwRN5uk+PwPmvyI7H+P53UMG5lGlVlrreamYAoAj1lY4 s/1QYpwCe1CfFyhP0h357l7S11B459WibjhSr1D+5fIVhx6bmI6tIB/yZunhkrUVc6Lb XRhQ== 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-sender:mime-version:subject:message-id:to:from:date :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=PSbGtkZHZHSPvzeFbyrM3Eb//WItKcmMJR2fop99ebQ=; b=513hQ6Bdv9WqxxjkttlOgCL5Cj4qObhVwF6sQy+ffoBCuiE2LisZOYmNF29MTm5mNx 2C3S5sBjkBtSmI4QR5EpOduSSC/y6aJ5bRpRmRjDhe6uUZqUMjm5IfCwwj3M/1sVCejT /wHQ7DFHNM0itWZcG0VJKWTES96UhtNvmrTVwr/jJXUvAIBmdOToC/quyimgbSZ+2uF2 WEy41ryR5mOuuiFtK94DKbNOiV9WBF9fEO4hPW6k5RWsRPOuno9ej9EWTxaU+O6fA3dO EZZDd0gA6BYj6SDlfzX+0uCsTM3Sq4jMRGkWqZhJ+737NEx+IOugNZoDbVqA0kMg020Q Pt0A== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKWGz7OwrjHNvtk5pNrFupw1jxWt5bqwqpg1Lz3Cw48v3bDABuBB rINdZHtXoY+4kCoW++jcYcI= X-Google-Smtp-Source: AK7set+XvFT+uz+CUctN7Vekv8vAPblK0JuZ/bYoP186gGr2F8fRBOtyf4EmF+a7BAg3Ate74C7YPQ== X-Received: by 2002:ac8:7505:0:b0:3bd:1838:2596 with SMTP id u5-20020ac87505000000b003bd18382596mr3423867qtq.8.1677335167680; Sat, 25 Feb 2023 06:26:07 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac8:4d8e:0:b0:3bd:1b92:edd1 with SMTP id a14-20020ac84d8e000000b003bd1b92edd1ls5791250qtw.9.-pod-prod-gmail; Sat, 25 Feb 2023 06:26:04 -0800 (PST) X-Received: by 2002:ac8:4146:0:b0:3bf:bac4:3581 with SMTP id e6-20020ac84146000000b003bfbac43581mr1372134qtm.7.1677335164668; Sat, 25 Feb 2023 06:26:04 -0800 (PST) X-Original-Sender: jdtsmith-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:32232 Archived-At: ------=_Part_580_212050843.1677335164043 Content-Type: multipart/alternative; boundary="----=_Part_581_448722177.1677335164043" ------=_Part_581_448722177.1677335164043 Content-Type: text/plain; charset="UTF-8" The Apple Notes app produces (via AppleScript) HTML for notes with nested lists structured like:
  • Level 1 element 1
    • Level 2 element 1
    • Level 2 element 2
  • Level 1 element 2
As you can see, the sublist is incorrectly positioned. It should be positioned *within* the
  • Level 1 element 1 item, ala:
    • Level 1 element 1
      • Level 2 element 1
      • Level 2 element 2
    • Level 1 element 2
    Is there a straightforward way with Lua filters to fix this at the AST level, for arbitrary-depth sublist nesting? -- 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/msgid/pandoc-discuss/163effbf-b672-4501-9171-8c4681034a96n%40googlegroups.com. ------=_Part_581_448722177.1677335164043 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The Apple Notes app produces (via AppleScript) HTML for notes with nested l= ists structured like:

    <ul>

    <li>Level 1 element 1</l= i>

    <ul>

    <li>Level 2 element 1</l= i>

    <li>Level 2 element 2</l= i>

    </ul>

    <li>Level 1 element 2</l= i>

    </ul>


    As you can see, the sublist is incorrectly positioned. =C2= =A0It should be positioned=C2=A0within=C2=A0the <li> Level 1 element 1 item, ala:

    <ul>

    <li>Level 1 element 1

    =C2=A0 =C2=A0 <ul= >

    =C2=A0 =C2= =A0 <li>Level 2 element 1</li>

    =C2=A0 =C2=A0 <li>Level 2 element 2</l= i>

    =C2=A0 =C2= =A0 </ul>

    = </li>

    <li>Level 1 element 2</li>

    </ul>


    Is there a straightforward way with Lua filters to fix this at the A= ST level, for arbitrary-depth sublist nesting?

    --
    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/163effbf-b672-4501-9171-8c4681034a96n%40googlegroups.= com.
    ------=_Part_581_448722177.1677335164043-- ------=_Part_580_212050843.1677335164043--