From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29167 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gwern Branwen Newsgroups: gmane.text.pandoc Subject: Should the HTML writer generate empty '' elements? Date: Sat, 4 Sep 2021 12:08:50 -0400 Message-ID: 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="19715"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDFJXQMSYMIRBN5UZ2EQMGQEPPW2Q3Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Sep 04 18:09:30 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-il1-f188.google.com ([209.85.166.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mMYET-0004xp-Uy for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 04 Sep 2021 18:09:29 +0200 Original-Received: by mail-il1-f188.google.com with SMTP id a15-20020a92444f000000b0022473393120sf1359352ilm.16 for ; Sat, 04 Sep 2021 09:09:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1630771769; cv=pass; d=google.com; s=arc-20160816; b=DP3Y6O7NXPd68q7WoLcPzDm/Bn5zXSKb5O0P7gnNKdQlrbDCl/llorpP+c/SRB4zDd 0Ab1ILaZv6DmqChVJhuoCWEmyp7Wtcn3ms7j9vs2IbSu6jB2jtBFTzWZoGwt72lwnrW2 Ucq3LVH4T7hxyNR/w6+NQFXqzc78ys2H3d6Lrt8gF6WcFWl/ap7C4ktKQUboHHRiYQnF DpoMPudahBnFxIhTJR2iecNctbDGACbGy8HILxp4AI3/6oU0WJgA5nFCLVyBCbRswm2a aG+Wv0jzyVUxgslIVkx0Gl6qw158iCsSh/FbKbuf3BLnWfKEvGQQwPOp7bhKr3go5XqQ aWpQ== 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:mime-version:sender:dkim-signature; bh=sFEkUkXXjSipPnMK/c2w8LayEm+3bl6UBndkNVIljb0=; b=Uy1WbuWRqNCxaRhP7syX7Wb+VaAQSbLwnnJfTJOLrTwXCY1dNpVOtdsJt9YnsLRtQA nGBC6eW+JXuJ8QWMl+bwh3ux2IbxndsFhDa8MPC5wzNmE0rKhyf5kR9v8yZHPnvPnbyT ahhvZwlnV0Mc5lwaEGYtqA1nYEfWZqkKAEJ74cu9UMQKHxOzusC114Yguc1wgJitM7ax Q8kpsI/Rb/KCJ6wn1ONe/kNiveDVP8Gcypi6I9AdGTRHtN7zYiquP54N2BtBZ7zmUX9r pBcFWszw0OO01/1In/jjLEaEVoj/QVsrqFGjRgt6MOyu646RtKY8DrBp+cXIDIrl/6Hk PPwA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.166.48 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: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=sFEkUkXXjSipPnMK/c2w8LayEm+3bl6UBndkNVIljb0=; b=VT2hH/9//5wwx3FUXIZ80x2QDSGDJw5MGXEv9+RvQ7AiR4/N4A/tfoTcju9ypU0ftq VYCj8/a8qi9RfD76nuqtX0wFqWXeaI3bg9edI6XUEo5ya3mKZUnXTr7fCyhbeS8MRaP8 7rVT/t6XH5AAStXSc+2SJ3kNBKX50h8IvV7DkhwV0cDin9E5k4cFkFSZiUEtXPrGKHOG hxz/nFZowTBSC+ltyNi6JMmzEFCY3AFxKUPvcp9U3ubnH5oVcJHcNCswU77MDC5jnJsV dnpgDvBQi9lcScWh3KfAsnHMIF3hE26EW4Is0nP2FLokwOTrk1A/Z7YKM8HbDg+F4fNu 6hZA== 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: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=sFEkUkXXjSipPnMK/c2w8LayEm+3bl6UBndkNVIljb0=; b=JZxxL7yV0RxJKRpZTP/XxV1p3eKjx1VcIGmP2f7UMBdE/M6GRxdqKteLe/nYV8QdcL WjbXQCHktqyBUCimwTngiPAAc7tGJeg6KQjkjAXlpOxZiwWOzbvGigaoKWJUiXsf+TWs qcJJjG1xIb5PNcyidjgprY9+qfyongDTIrvBQxNgGR1WSxMWrLfgqYdPh4bY6NZzlpwe Qw7hIZ2QpZsdcNGeq5VbtUP1iY5H4yHrFPOXTOp8sw9yPqbUZqvR5bBDpTzZs/zXxm+A EN1R/kl779nhRGJ3aruQLLCK7hggeue0KBbxMP4bJ6dhEr1oqesY8lzbdPr2ttmqrTT0 GoNQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531a5gwTzfFoMfEfSuUJrf+KzbLwaq1dIDknS4oSnvtiAlWmxmbb WQ07P35XazQCgutrnjPMswQ= X-Google-Smtp-Source: ABdhPJzUcr4bAp3HILXAs9BxY1pjKk6XuSCk1bK2kaQlfevW7BVGE3tXwfIxGQwEtsFlmdE1CjSRhg== X-Received: by 2002:a92:d606:: with SMTP id w6mr2966754ilm.28.1630771768979; Sat, 04 Sep 2021 09:09:28 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a92:c08d:: with SMTP id h13ls425162ile.6.gmail; Sat, 04 Sep 2021 09:09:27 -0700 (PDT) X-Received: by 2002:a92:650c:: with SMTP id z12mr3126082ilb.87.1630771767586; Sat, 04 Sep 2021 09:09:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630771767; cv=none; d=google.com; s=arc-20160816; b=RBOTf5HseEZgx259VVr4ddrIEKk3xPBG7AjtYrVuIPJBsbym15IjT7p/ZZA3i6v/c4 u89lLvhWaU/duBNN7KGERTaGuf/1PcYEKlByne1qYacsJUm3gFMBXN8SKuk4cgot7YC/ tvnH+f/UtaTigDvEVXkzWgDvlNDMDH+sEHAHZvv4zwhcv/HSHHMq/2NX8g4FhdGSkXW0 xaa4+/X0kdmUhytJDxiag1FXwCfFX5CTc3f7HjEwbtTRnghj/rVZl2qFGH/nrGkZTO6j Br7aHX+WAX4EURttJ+uzBxrA6UZFFpvuLbxlr0J2ZZV70rcn7g2AsZL9lOslpTjjyF6b +XZg== 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 :mime-version; bh=hTf4BJ1yLzcPs2rE+Qy8e+6BZFmUg/cznI1urTdtVAY=; b=m4MH0tXufaj20kDMk+AsKz4nq3O9dcjiYFM7KVoM01aV0weidyN+XCfDvnsxWA9YoX uADqWa+sZGbSu0XTh7JJYq5Kxg/3GRGn9B6+K15pBTzmtE72IeoFII4WquvS7EtqBkDA PUFe4rN6krVd8bekesw95UP9iQ+aWwg9yC/KAwlWwLz2v5epF9YDUXNUFMbURnhj00mv 4jil9OJ4crgSFA/XDnpaeCf0hEbWhuAg8jowud8EEyMvQbcL4CdGiz9JpmPzi29shj5J eXJS1RLRsZfAlsW+ngyjJ5OBMcbodM6irIH3T/ip2DzpECL1LQdBsnhinW3byP0IBYpp 8EeQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.166.48 as permitted sender) smtp.mailfrom=gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Original-Received: from mail-io1-f48.google.com (mail-io1-f48.google.com. [209.85.166.48]) by gmr-mx.google.com with ESMTPS id o21si136424iov.2.2021.09.04.09.09.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Sep 2021 09:09:27 -0700 (PDT) Received-SPF: pass (google.com: domain of gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.166.48 as permitted sender) client-ip=209.85.166.48; Original-Received: by mail-io1-f48.google.com with SMTP id g9so2813911ioq.11 for ; Sat, 04 Sep 2021 09:09:27 -0700 (PDT) X-Received: by 2002:a05:6638:2257:: with SMTP id m23mr3896545jas.137.1630771766812; Sat, 04 Sep 2021 09:09:26 -0700 (PDT) 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.48 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:29167 Archived-At: While working on cleaning up & debugging my smallcaps/ code I noticed again that Pandoc will compile empty Span Inline nodes to empty HTML '' (or just '') elements. Is there any reason Pandoc should do this? Example: $ echo 'Span ("",[],[]) []' | pandoc -f native -w html (Hakyll seems to render that as a self-closed '' somewhere in the pipeline, but same thing.) The reasons not to are that an empty Span would appear to be meaningless, since it cannot style or wrap any *span* of text. As there is nothing in it, it cannot be styled easily by CSS (you could write CSS rules which affect it but I think only by selecting on all span elements by either class or possibly position, which would seriously screw up regular useful spans since whatever you were doing to the empty span would affect them too, and so I guess you'd have to negate every single class or position you *didn't* want to affect?). Since there is no reasonable use I can come up with, that implies an empty span is probably an error by the user or Pandoc somewhere, which would be a good reason to warn/error about it. Further, it is possibly buggy. Empty spans appear to confuse and enrage various tools (although I haven't found any statement that it is outright illegal by any standards); the W3C HTML checker is extremely unhappy about empty self-closed spans*, Firefox's view-source parses it in strange ways, empty spans appeared to cause issues with my auto-smallcaps rendering the entire following paragraph in smallcaps as well until hitting a

implicitly closing the span run amok, ckeditor removes empty spans by default (https://github.com/ckeditor/ckeditor4/issues/2484), and HTML Tidy both warns about & outright deletes empty spans when reformatting.** So, do any Pandoc users ever use completely empty spans? Empty spans but with IDs or classes or attributes? Empty spans in any context whatsoever? Can you come up with any legitimate reason that the HTML writer should generate empty spans? If not, then I'll file a bug about suppressing empty spans. * The W3C validator errors for '': Error: Self-closing syntax (/>) used on a non-void HTML element. Ignoring the slash and treating as a start tag. From line 152, column 1; to line 152, column 8 d>=E2=86=A9=E2=86=A9=E2=86=A9=E2=86=A9=E2=86=A9=E2=86=A9=E2=86=A9=E2=86=A9 element. Defaulting to '-' as the title. To specify a title, use 'title' in metadata or --metadata title=3D"..= .". line 2 column 1 - Warning: attribute "lang" lacks value line 152 column 1 - Warning: trimming empty Info: Document content looks like XHTML5 Tidy found 2 warnings and 0 errors! --=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/CAMwO0gywhE%2Bu4wgaL0sieohjuqAm%2BVM2Lj489EsQST74FMqrMA%40ma= il.gmail.com.