From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23218 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ken Dow Newsgroups: gmane.text.pandoc Subject: Manipulate Image in DOCX -> HTML using Lua Filter Date: Fri, 9 Aug 2019 12:53:07 -0700 (PDT) Message-ID: <2ad2cd23-4cc0-4e2a-bf07-bd2f09e2ae03@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_919_313616809.1565380387013" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="199557"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBD7LJ7PVSXEJB62ECCRZ5N7KAUNAIJ77FATA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Aug 09 21:53:11 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ot1-f61.google.com ([209.85.210.61]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hwAwn-000pmb-H2 for gtp-pandoc-discuss@m.gmane.org; Fri, 09 Aug 2019 21:53:09 +0200 Original-Received: by mail-ot1-f61.google.com with SMTP id e42sf9110178ote.20 for ; Fri, 09 Aug 2019 12:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=TO9Fdd2ovAxiHxMUtAXDMSu1NqS6hGkmroX/wMDJGkA=; b=BHhTo4T1Q9DOhqrHxjj3rd335eNn/MhbRkGhCbjoWktqqa2nu5TNV9CW/8Psz3oJzA opt7Z85KNDW6Vp/qQWZsQ4UudEfPUxBnS2QBk+MUPTWAurtF1axi4/LEBV08bMUYoC7Z Wh8NIBX9bs+lO/ex1HBd+ALQLQx48hPrDM4XvoxyAJ2OMo0inKQOoo+abFse9dwAjs1T mibBNBkJaMJ/rhS9Dyt4v8OhKTYSAPebv5JweNQgV1Bp63Qc5d0pzeuo5ugtc7MJJKVn SijT1ww1HfEL2pCJL9I7PDGndn9+bE6RQV5kseJefi39exnaacNQJUutBqqINOwSBOsn lk3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; 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=TO9Fdd2ovAxiHxMUtAXDMSu1NqS6hGkmroX/wMDJGkA=; b=Ezy633KOqblPn8IDLyXDsItSD+7OiHAK/mvoDhigmUSxWTY3IDdGu2VWT0yCpeD/YE Y7p2UFmNOZWlbUqwOSLg9QZsBLdyHFhCfwiNh+DwvX6CagJKezkgSU+eh8kCIBdNh3rK hqn28E6qeklGXKLaaHZQo3PQaekYshUlraL4Tonh7UilMWaqGMWKp2bjY7Wkn9htkDq0 BSveVHdoTYKFf5BJOYNF47JKFluM5pXMyXNyULaw7A2wZVAjV62oaJDN05nXf+VczDNc Yt9DRVaf66WVZid8YF1ZofKCzIaz/jw1t28CR4tCDp7vgwCndSnurr7zSTaS7fSvJEjl R/dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=TO9Fdd2ovAxiHxMUtAXDMSu1NqS6hGkmroX/wMDJGkA=; b=E8GnhXKkDQ+ZVhWO40ZV/bfByRa3WoMjnC/stJuReLDz5Z449LwFg9WzKzSjTM/Dsm Tg0G+H1RCKXEPix84YVmDMaLjEu7DSvblnlQzmABSuo7jkQ2qKob+CCfC/HfU1gkzdGu lUljeSLK3fUtq54LAe3LuOrSLxV6pFL3C2FnPSQVDn2M2J7hTOR+opvxekATwMCMHL+n /Aw40ETByx9VUGCZWjCH9Sjr7RDa/oOO9tgNXgYliJnSx24iaCOst7tHw9+lwiQzlMKs TeA1O+KTRcTRrzV6RHSPvNBKi4z1r6QQ1RAiVOj0gj7Qzdg2IBROO8Jv+ng+ffTbeCUT yhAw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAWqyz1r/w2jfK4pSj6/uHLIL34SrmPu725p5JZQCalj7TsqLstO gyU6spVfDIo0JCgUoGryggY= X-Google-Smtp-Source: APXvYqzaP6b6szrNZ5h1A58XF7X/gXVJ2+l76JQcVPZn1ivIf3w7ugup3yLXQ9jInKhnId0X1YNIJA== X-Received: by 2002:a05:6830:13d9:: with SMTP id e25mr19764292otq.197.1565380388336; Fri, 09 Aug 2019 12:53:08 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:17e9:: with SMTP id j96ls3412086otj.12.gmail; Fri, 09 Aug 2019 12:53:07 -0700 (PDT) X-Received: by 2002:a9d:7003:: with SMTP id k3mr20085822otj.28.1565380387602; Fri, 09 Aug 2019 12:53:07 -0700 (PDT) X-Original-Sender: thekenshow-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.org gmane.text.pandoc:23218 Archived-At: ------=_Part_919_313616809.1565380387013 Content-Type: multipart/alternative; boundary="----=_Part_920_1369457646.1565380387013" ------=_Part_920_1369457646.1565380387013 Content-Type: text/plain; charset="UTF-8" I'd like to modify the attributes of all images from a DOCX conversion to HTML in a Lua filter. So far: function Image(el) el.classes = {"image"} -- el.attributes = {"style", "mu"} return el end This el.classes line sets the `img` class = "image". The el.attributes line removes the `img` tag from the output. What am I missing? -- 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/2ad2cd23-4cc0-4e2a-bf07-bd2f09e2ae03%40googlegroups.com. ------=_Part_920_1369457646.1565380387013 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'd like to modify the attributes of all images from a= DOCX conversion to HTML in a Lua filter. So far:

func= tion Im= age(el<= /span>)=
=C2=A0 =C2=A0el
.classes =3D {"image"}
-- =C2=A0 el.attributes =3D {"style",
"mu"}=
=C2=A0=C2=A0
return el
end

=

This el.classes line sets=C2=A0 the `img` class =3D = "image". The el.attributes line removes the `img` tag from the ou= tput. What am I missing?

--
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/2ad2cd23-4cc0-4e2a-bf07-bd2f09e2ae03%40googlegroups.co= m.
------=_Part_920_1369457646.1565380387013-- ------=_Part_919_313616809.1565380387013--