From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29172 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gwern Branwen Newsgroups: gmane.text.pandoc Subject: Re: Should the HTML writer generate empty '' elements? Date: Sat, 4 Sep 2021 19:15:13 -0400 Message-ID: References: <543ae04c-c5ef-99c3-cff7-15068893b3e4@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="23080"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDFJXQMSYMIRBJX4Z6EQMGQE5V4GKXA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Sep 05 01:15:53 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qt1-f186.google.com ([209.85.160.186]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mMet7-0005r4-3w for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 05 Sep 2021 01:15:53 +0200 Original-Received: by mail-qt1-f186.google.com with SMTP id z16-20020ac86b90000000b0029eec160182sf4603288qts.9 for ; Sat, 04 Sep 2021 16:15:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1630797351; cv=pass; d=google.com; s=arc-20160816; b=op8RXnlwmh6I13NFBvMJiIuOHDwatyJ8qRGj5hRzZf/sNfgDPpx5p7SfcT0L1cVTry zChkdk1io1yugsk+lATmKjqoUr0PiHejJeMsEPPIqTkraP1wxAciPzszUGKHQQpwxtFs WyU2ywXJz/bpdiPOPOo0qZKFqnT5Haci5nWYp8/VkVo64EZZmAGA1/58escO3MjDg9yG 9qoWvTkbO+0EjI2aT2L5N/zg6eRmVVUFjBxVxASX/EFjiFx/KKj3dTXnMpd/uFvGwzWO 3I44JlRWm4FNP2or9VGs3Tt1hZxEsZfE1fMQU7wxUSW7Y9UlNf6PljtRyOc356Lwu8YF 9EKw== 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:content-transfer-encoding :to:subject:message-id:date:from:in-reply-to:references:mime-version :sender:dkim-signature; bh=vc9YF6UrVwb2H0yzr7DuxpwjtqREe0NmugSKzgKGYW8=; b=PoDCuEQqqeEUYl/ubVEIdJ3j68KA6iqmN5tdPLdLRxp8NCcsnLyykuvn44vhD+ailC FpAx+awvRLDLeNwGahg545zL/x/mci7ziI/dfFm2oQAaSHGy9g7P/gSS8krx5l6+UeHO SkDTfOyl4UOayrBQVPpc8sOQR+RzHRzfuUqqfbu4Y2i++ld9TVxNl5PZlu80DLiyZgO7 tb+FokeH77tjMPvkSiYEJkGLntYFqiNXEN8wsLK64CwzxniGF+whXB+5Jfm+lJt88cdt wAFRiJDrwkw4bsRxQS1k3Dg5yBUR68RmHFtjpwXbgqjGiN6LEbVUxy8Iyc8rrPJVNU4L ce3Q== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.166.41 as permitted sender) smtp.mailfrom=gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to:content-transfer-encoding:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=vc9YF6UrVwb2H0yzr7DuxpwjtqREe0NmugSKzgKGYW8=; b=mZjC0QCA+6CrRQSrM6DMDd9qfu8tVPh9tGCnn6zOFvXTQxuU68l6ogER8SL01G2x7T R/SaXUqUs60oDQ9XykipWneYn0YMmB/C7pgri9G6mRU34kI87xGlJJCmQ++ThnfNfDEl zKlyzbDluqDMKkY6tWO8hS+OUSixACpPD47O8OEhFlpEBxSUiHhZ1xF7o4zAurWblxPy TmEBe8loeA9c7kvax8hLQD0IOkfg5DzvGyBqHCocUo//9IzFH1chivgiAV4SbOxv099e sOUdZHnZpW6Ni0ph3bmS2buiiaborCLWclqu+203Y7F+RlEKcatstgVScprn8YDR0ph8 ZUsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=vc9YF6UrVwb2H0yzr7DuxpwjtqREe0NmugSKzgKGYW8=; b=by++/3fs6r4uN9LN4phI5zUIa8//k2WZDaGeA69/msNFtcIeD+bpFmn+aINRs0p1oO vsVfhBIXOGdC1dcE1ZjIcA8pnKPXwfzs2kZ5gX0zSxGWrXz6TKlkDyMK9ftUYxcQgcJK 0hT0sg8/+4YdHxrqtLBGEZ7lQTpRZ5FRQOCbgMjuNmavgk9NrMkFZDBEXOuarRGutkUA uLdeg8Zhbdc3TRYwGSJEU0c18wUneTrdejtUaOCQFigYPbHOzSalMSDS0TAuu8JGmpIK 7OlHLyZpb+y2+b1kl6Mf5ZKxqFGIxml5gsCB68ZYtt0gOXfFJMDObJF50DA6u8EOm1ir Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532KDIDZO6xwMFwZ6k4NmdvhDhluN+sZ3Wk1/QczVgWtk315AOgs M7t3wRpQ2DlzWJTxyE48YvA= X-Google-Smtp-Source: ABdhPJyKqVyx3pU6bF+6G40+aNHzqnf7K17wZmK4dhDs37lfAeOIc/1EUaj1SzSXGCbUVNhCxPe6xQ== X-Received: by 2002:ac8:6e9b:: with SMTP id c27mr5321008qtv.191.1630797351840; Sat, 04 Sep 2021 16:15:51 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ad4:57ca:: with SMTP id y10ls1015721qvx.11.gmail; Sat, 04 Sep 2021 16:15:50 -0700 (PDT) X-Received: by 2002:ad4:54e9:: with SMTP id k9mr5893831qvx.4.1630797350272; Sat, 04 Sep 2021 16:15:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630797350; cv=none; d=google.com; s=arc-20160816; b=GmBRSX+49JWyldwbyQRsgkvkN3O7MUw9WtWOvX6WrXmFKT7fsx9e/VJhzYlzB1x+18 T/bOP6ijKtTGPwAukGtMmhmDHnaT68z5iLtUdUUPnhutwOWWbPZ88bokbpH19JBhPzuK fZhY4AF7EAU2p+fKuUgbp/IflrdSb/9ODuF2msnj0nI1SZLctAavP8+j1qqnps9Bftgi JndSrU2jP/fLMhJBRI66v3MhuWabSY/0KlxqngeUHkG00JTLnt8oB+YC/uwXKk/qG74c 8t/8MhOmkMLHTHozBh8asOXMfCyBZK61VhZ6SuqGkAQK2d/uksZbfiKHz7lciENGy/Ya o9TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=MY5qOkMbO0+4N5UONeUccugbrMk9g0ds3Un7BnXpDDY=; b=iZMt5i64jwSLj646u/DkFfcSL/4rn4yPT/feGbaunYAnI1qyVixVdZF1VofrWgZU/J xxtvFZ4eXUdtWb/Z3//Ij0pQzfYN6/3KSwOn9K+XAUQ8uc66UU3jh7LeI2/qLkjtd5AY AHSKUQPEes/1S+dQ6q7xDvIhuAOrLpk19Dz7FVKnkVQWsXjPeajxxd250VMGVYIBScXY Q1Xi0wYvMRsVaXJQIPNky3AvXKbbqGOuUaANgb2XFCRb1OMGCnhyP/wpmwXEPuPZ5BHl mENwo0MW3+8q+YkIadtP2+bVVu5EPSTqdVTSQtNnsq0UfJP1CtO2UM9lCceV7WPtdoa5 QbfQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.166.41 as permitted sender) smtp.mailfrom=gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Original-Received: from mail-io1-f41.google.com (mail-io1-f41.google.com. [209.85.166.41]) by gmr-mx.google.com with ESMTPS id 10si292770qtr.1.2021.09.04.16.15.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Sep 2021 16:15:50 -0700 (PDT) Received-SPF: pass (google.com: domain of gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.166.41 as permitted sender) client-ip=209.85.166.41; Original-Received: by mail-io1-f41.google.com with SMTP id e186so3666382iof.12 for ; Sat, 04 Sep 2021 16:15:50 -0700 (PDT) X-Received: by 2002:a05:6602:1346:: with SMTP id i6mr4351983iov.128.1630797349417; Sat, 04 Sep 2021 16:15:49 -0700 (PDT) In-Reply-To: <543ae04c-c5ef-99c3-cff7-15068893b3e4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> X-Original-Sender: gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.166.41 as permitted sender) smtp.mailfrom=gwern0-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:29172 Archived-At: On Sat, Sep 4, 2021 at 6:49 PM MarLinn wrote: > There's probably a lot more, these are just some cases I thought of. Most of your cases appear to require IDs, classes, or attributes: #2, #3, #4 (you're not going to just 'background image' *every* span in the page can you?), possibly #5; I'm not sure about #1 'clearfix' or #7 'count of elements' (how does that work?), and #8 is too vague for me to comment on. > Is an empty span always the best solution to these problems? Probably not= . But sometimes it is. Have you run into an actual case? It seems like it must be quite rare given how many tools warn or delete empty spans already, and I didn't find anyone complaining about how they genuinely needed them because all the alternatives were worse. > The most relevant as it relates to pandoc is probably the third one: in a= pandoc filter. Because of that I would not want to see this feature be rem= oved. Can you give an example of a Pandoc filter where an empty Span or completely empty Span would be useful? Also, why would a filter care about the compiled HTML not having empty ''s in it? It'd be doing all its work before the HTML writer is ever called. Any kind of tagging or marking is finished well before. > Now, should the span be self-closing? That's a different question. I susp= ect that that's the main reason for many/all of the errors you're seeing, n= ot the pure empty-ness. So that might be something worth changing. But as y= ou're saying, that's a Hakyll problem, not a Pandoc problem. Well, I should clarify that I *think* it's a Hakyll problem simply because the standard Pandoc settings on the CLI and ghci don't seem to produce self-closed tags but I get them in the final generated HTML; I haven't looked into it in more detail to figure out where the self-closing happens because I couldn't convince myself that writing out empty spans is even desirable in the first place (so what happens further downstream may be moot). --=20 gwern https://www.gwern.net --=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/CAMwO0gyKnt3aaaGqM_D61ttQOM0v4iz2uHM3RtW9pgkiO%2BfWXg%40mail= .gmail.com.