From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31841 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: - Newsgroups: gmane.text.pandoc Subject: Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter? Date: Mon, 5 Dec 2022 09:58:04 -0800 (PST) Message-ID: <3ae58adb-8789-4398-8ab0-fe1e6928e292n@googlegroups.com> References: <83eeff5c-8fc3-4ca3-862c-bb85790daabcn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5002_1686974529.1670263084482" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="922"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDR3RNPJ3YORBLPCXCOAMGQEOFW2YKA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Dec 05 18:58:09 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f55.google.com ([209.85.210.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p2FjF-000AeC-Bj for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 05 Dec 2022 18:58:09 +0100 Original-Received: by mail-ot1-f55.google.com with SMTP id e5-20020a0568301e4500b0066e7236e566sf7148600otj.23 for ; Mon, 05 Dec 2022 09:58:09 -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:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=PZ6FB0XM88Vov6NvuIXA7mlZ6IW5DW5SJqAUw+VdanU=; b=IWMPHsocqrk13SUCYuhdUM9Ec5L3jBD6U6wiKxZBPW4PqLi9tYueGsvpKvRSEejrCj qnj5CCDK0CDXHQhDCawFTdxNlbcxcTG89YVyu7GN0ajoXV0mHyuaijoSpANWygjulTQw D6PT0fcdMXyeEhNJxFIo7P9ydksEmA4OOd+M3J22e3ckbJd7+nUDKUg6AVnMb9/9XvId eDOZmDS9JBMi1FtB3YqkI/W5ORu62Wrd0GCtCUo3gG6SsrcyZjWGZtFYwYibGGUm3mDH L5cRprAFLCsNIuehlfqR6a5ql4WRzPBzA+7J8bA5+nQAorfo1j02TGU/j7fTicXwcJBD 9jcQ== 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:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=PZ6FB0XM88Vov6NvuIXA7mlZ6IW5DW5SJqAUw+VdanU=; b=W5yw6mmve0m21duUp73Jws53U0AcC+Ajewyg7NOElff2gSb6748NFvQukkXcWFCBgr lmV/1o3Z3T9QzB2rCvXpRPPTiFDZt2KgDb1KGI/EYHc86wQs8iOImVekeB5FF90GhwXJ wdV96PVkKbbSPMkxRYH4fUaZ9JW6UH5kNNI00gGAaFjiHr6kX7c8+jzSlhwbr8dj328+ vnivWpK8HmhPpZsmDGuVZtg55c6r3N+nHMpFwbwHng9x+1td5dTmoo+KbU3Q2He8NC7s rWeEm5HKwMFZwLvhGH3vzTiaLn/SzU5h8RdbJ5k7xhWBbNR6qENXGSQeXbQyJDh2E8lX 3+Vg== 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:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=PZ6FB0XM88Vov6NvuIXA7mlZ6IW5DW5SJqAUw+VdanU=; b=7lrwBzK6nb36KmDXKsn3um4ZUMJHvi+9hKflteQHhy454ajTyp42Hebwk+/N6e2Duc JhBHEAJFT1dH3IMDvszpSA6DpBy5zreCalCZUPWTzvGsCRw+L7SokAdr/x5o5fCEiJYW vY4rk5MiWJH+W8qScz7ImHE5z4dUW7lLCUDepSl9WyBZ8FcED+aTkaMPJpWIctGjsjRG JYrE0FEDctMNdCutkAAr2eBuYrEISeiSnhK+if5VdiWa/fco026wxkELYKFyOC5ZungL ifsDtpjE1TWKHEMDl/0rdHgu2SRnKIHiTwf1y4N3FLIaDR55e83gi/9ayQSLmYnCkv3F HXdA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pldM5fC78K/U/uW1+yNP0iQsXswDEdbc79favuM3/14m4YEVhva refdaz8DnxW7kSk2N+nFiFI= X-Google-Smtp-Source: AA0mqf53VlHJuyLOGtowO4v4ivAigYtCUxaKEl+rm3/oKJ5Yum5+xntho/ImaS3oDLeWnH/Stocjuw== X-Received: by 2002:a05:6871:4490:b0:131:cde9:c89d with SMTP id ne16-20020a056871449000b00131cde9c89dmr50269716oab.5.1670263088256; Mon, 05 Dec 2022 09:58:08 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:702:0:b0:345:bc21:cf7a with SMTP id 2-20020aca0702000000b00345bc21cf7als1643540oih.1.-pod-prod-gmail; Mon, 05 Dec 2022 09:58:05 -0800 (PST) X-Received: by 2002:aca:6107:0:b0:35b:4bd8:6833 with SMTP id v7-20020aca6107000000b0035b4bd86833mr34406101oib.104.1670263085198; Mon, 05 Dec 2022 09:58:05 -0800 (PST) In-Reply-To: <83eeff5c-8fc3-4ca3-862c-bb85790daabcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: paulschillinger93-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:31841 Archived-At: ------=_Part_5002_1686974529.1670263084482 Content-Type: multipart/alternative; boundary="----=_Part_5003_1016718013.1670263084482" ------=_Part_5003_1016718013.1670263084482 Content-Type: text/plain; charset="UTF-8" I've tried this: return { { Para = function (elem) if elem.content[1].text == "{{helloworld}}" then return pandoc.RawBlock('html','
abc
') else return elem end end, } } but that only gets rid of {{helloworld}}, it doesn't replace it with anything. Sadly this doens't work for "==", i.e. those don't disappear. On Monday, December 5, 2022 at 6:49:08 p.m. UTC+1 - wrote: > I've been trying to replace markdown/Obsidian highlights "==" either with > something that LaTeX can use e.g. \hl or just delete it/replace it with > nothing, but I can't figure out how to do this. > > I've tried this: > function Str (str) > str.text = string.upper(str.text) > return str > end > > But I can't even figure out where I'm meant to put my own text? > > How do I rpelace == with " "? > > Thanks! > -- 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/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com. ------=_Part_5003_1016718013.1670263084482 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I've tried this:

return {
  {    Para =3D function (elem)
      if elem.con= tent[1].text =3D=3D "{{helloworld}}" then
        re= turn pandoc.RawBlock('html','<div>abc</div>')
    =   else
        return elem
    &nb= sp; end
    end,
  }
}

but that only gets rid of {{helloworld}}, it doesn't replace it with anyth= ing. Sadly this doens't work for "=3D=3D", i.e. those don't disappear.
<= /div>
On M= onday, December 5, 2022 at 6:49:08 p.m. UTC+1 - wrote:
I've been trying to repl= ace markdown/Obsidian highlights "=3D=3D" either with something t= hat LaTeX can use e.g. \hl or just delete it/replace it with nothing, but I= can't figure out how to do this.

I've tri= ed this:
function Str (str)=C2=A0
= str.text =3D string.upper= (str.text)
= return str
end

<= /span>
But I can'= ;t even figure out where I'm meant to put my own text?

How do I rpelace =3D=3D with " &= quot;?

Thanks!

--
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/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.= com.
------=_Part_5003_1016718013.1670263084482-- ------=_Part_5002_1686974529.1670263084482--