public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
@ 2022-12-05 17:49       ` -
       [not found]         ` <83eeff5c-8fc3-4ca3-862c-bb85790daabcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: - @ 2022-12-05 17:49 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 802 bytes --]

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/83eeff5c-8fc3-4ca3-862c-bb85790daabcn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1933 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]         ` <83eeff5c-8fc3-4ca3-862c-bb85790daabcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-12-05 17:58           ` -
       [not found]             ` <3ae58adb-8789-4398-8ab0-fe1e6928e292n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: - @ 2022-12-05 17:58 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1259 bytes --]

I've tried this: 

return {
  {
    Para = function (elem)
      if elem.content[1].text == "{{helloworld}}" then
        return pandoc.RawBlock('html','<div>abc</div>')
      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.

[-- Attachment #1.2: Type: text/html, Size: 2835 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* AW: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]             ` <3ae58adb-8789-4398-8ab0-fe1e6928e292n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-12-05 22:56               ` denis.maier-NSENcxR/0n0
       [not found]                 ` <24509d5ca5844dbda07b3e77d86ab3f4-NSENcxR/0n0@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: denis.maier-NSENcxR/0n0 @ 2022-12-05 22:56 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2679 bytes --]

What exactly are you doing? Your output format is html? I’ve just tested this and it seems to work.

```cmd
C:\Users\denis\Downloads\filter>cat test.md
asf

{{helloworld}}

asf
C:\Users\denis\Downloads\filter>pandoc test.md
<p>asf</p>
<p>{{helloworld}}</p>
<p>asf</p>

C:\Users\denis\Downloads\filter>pandoc test.md -L filter.lua
<p>asf</p>
<div>abc</div>
<p>asf</p>
```
Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von paulschillinger93-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Gesendet: Montag, 5. Dezember 2022 18:58
An: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?

I've tried this:

return {
  {
    Para = function (elem)
      if elem.content[1].text == "{{helloworld}}" then
        return pandoc.RawBlock('html','<div>abc</div>')
      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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-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<https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/24509d5ca5844dbda07b3e77d86ab3f4%40unibe.ch.

[-- Attachment #2: Type: text/html, Size: 8044 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]                 ` <24509d5ca5844dbda07b3e77d86ab3f4-NSENcxR/0n0@public.gmane.org>
@ 2022-12-05 23:04                   ` -
       [not found]                     ` <e9cb34ca-b760-4ef6-9432-91d37f5e45c5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: - @ 2022-12-05 23:04 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3139 bytes --]

No, my intended output is a PDF file. Does that change anything? Could you 
tell me what exactly you put in filter.lua?
Thanks!

On Monday, December 5, 2022 at 11:56:39 p.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote:

> What exactly are you doing? Your output format is html? I’ve just tested 
> this and it seems to work.
>
>  
>
> ```cmd
>
> C:\Users\denis\Downloads\filter>cat test.md
>
> asf
>
>  
>
> {{helloworld}}
>
>  
>
> asf
>
> C:\Users\denis\Downloads\filter>pandoc test.md
>
> <p>asf</p>
>
> <p>{{helloworld}}</p>
>
> <p>asf</p>
>
>  
>
> C:\Users\denis\Downloads\filter>pandoc test.md -L filter.lua
>
> <p>asf</p>
>
> <div>abc</div>
>
> <p>asf</p>
>
> ```
>
> *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> *Im 
> Auftrag von *paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> *Gesendet:* Montag, 5. Dezember 2022 18:58
> *An:* pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> *Betreff:* Re: How do I replace a string in all text that pandoc 
> converts, i.e. how do I do this with a filter?
>
>  
>
> I've tried this: 
>
>  
>
> return {
>   {
>     Para = function (elem)
>       if elem.content[1].text == "{{helloworld}}" then
>         return pandoc.RawBlock('html','<div>abc</div>')
>       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-discus...-/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 
> <https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 7247 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* AW: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]                     ` <e9cb34ca-b760-4ef6-9432-91d37f5e45c5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-12-05 23:09                       ` denis.maier-NSENcxR/0n0
       [not found]                         ` <2faac96e448d4303b3ea0e12ef05dfbe-NSENcxR/0n0@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: denis.maier-NSENcxR/0n0 @ 2022-12-05 23:09 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 4537 bytes --]

Just your example filter:

```lua
return {
  {
    Para = function (elem)
      if elem.content[1].text == "{{helloworld}}" then
        return pandoc.RawBlock('html','<div>abc</div>')
      else
        return elem
      end
    end,
  }
}
```

The problematic line is this: return pandoc.RawBlock('html','<div>abc</div>')
This adds a raw block that will only come in to effect when your output format is html.

If your target ist latex, you’ll need something like this: return pandoc.RawBlock('latex','\\whatever{abc}')

```cmd
pandoc test.md -L filter.lua -t latex
asf

\whatever{abc}

asf
```


Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von paulschillinger93-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Gesendet: Dienstag, 6. Dezember 2022 00:04
An: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?

No, my intended output is a PDF file. Does that change anything? Could you tell me what exactly you put in filter.lua?
Thanks!

On Monday, December 5, 2022 at 11:56:39 p.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org<mailto:denis...-NSENcxR/0n0@public.gmane.org> wrote:
What exactly are you doing? Your output format is html? I’ve just tested this and it seems to work.

```cmd
C:\Users\denis\Downloads\filter>cat test.md
asf

{{helloworld}}

asf
C:\Users\denis\Downloads\filter>pandoc test.md
<p>asf</p>
<p>{{helloworld}}</p>
<p>asf</p>

C:\Users\denis\Downloads\filter>pandoc test.md -L filter.lua
<p>asf</p>
<div>abc</div>
<p>asf</p>
```
Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Gesendet: Montag, 5. Dezember 2022 18:58
An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?

I've tried this:

return {
  {
    Para = function (elem)
      if elem.content[1].text == "{{helloworld}}" then
        return pandoc.RawBlock('html','<div>abc</div>')
      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-discus...-/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<https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/2faac96e448d4303b3ea0e12ef05dfbe%40unibe.ch.

[-- Attachment #2: Type: text/html, Size: 13869 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]                         ` <2faac96e448d4303b3ea0e12ef05dfbe-NSENcxR/0n0@public.gmane.org>
@ 2022-12-05 23:32                           ` -
       [not found]                             ` <7cabb17e-9a2b-4251-bd95-c5415140c9adn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: - @ 2022-12-05 23:32 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 5394 bytes --]

YES! that works! But can you tell me why it replaces the whole line? Can't 
I do this in running text?
Thanks!
return {
  {
    Para = function (elem)
      if elem.content[1].text == "{{helloworld}}" then
        return pandoc.RawBlock('latex','abc')
      else
        return elem
      end
    end,
  }
}




On Tuesday, December 6, 2022 at 12:09:13 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote:

> Just your example filter:
>
>  
>
> ```lua
>
> return {
>   {
>     Para = function (elem)
>       if elem.content[1].text == "{{helloworld}}" then
>         return pandoc.RawBlock('html','<div>abc</div>')
>       else
>         return elem
>       end
>     end,
>   }
> }
>
> ```
>
>  
>
> The problematic line is this: return 
> pandoc.RawBlock('html','<div>abc</div>')
>
> This adds a raw block that will only come in to effect when your output 
> format is html.
>
>  
>
> If your target ist latex, you’ll need something like this: return 
> pandoc.RawBlock('latex','\\whatever{abc}')
>
>  
>
> ```cmd
>
> pandoc test.md -L filter.lua -t latex
>
> asf
>
>  
>
> \whatever{abc}
>
>  
>
> asf
>
> ```
>
>  
>
>  
>
> *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> *Im 
> Auftrag von *paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> *Gesendet:* Dienstag, 6. Dezember 2022 00:04
> *An:* pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> *Betreff:* Re: How do I replace a string in all text that pandoc 
> converts, i.e. how do I do this with a filter?
>
>  
>
> No, my intended output is a PDF file. Does that change anything? Could you 
> tell me what exactly you put in filter.lua?
>
> Thanks!
>
>  
>
> On Monday, December 5, 2022 at 11:56:39 p.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
> wrote:
>
> What exactly are you doing? Your output format is html? I’ve just tested 
> this and it seems to work.
>
>  
>
> ```cmd
>
> C:\Users\denis\Downloads\filter>cat test.md
>
> asf
>
>  
>
> {{helloworld}}
>
>  
>
> asf
>
> C:\Users\denis\Downloads\filter>pandoc test.md
>
> <p>asf</p>
>
> <p>{{helloworld}}</p>
>
> <p>asf</p>
>
>  
>
> C:\Users\denis\Downloads\filter>pandoc test.md -L filter.lua
>
> <p>asf</p>
>
> <div>abc</div>
>
> <p>asf</p>
>
> ```
>
> *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> *Im 
> Auftrag von *paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> *Gesendet:* Montag, 5. Dezember 2022 18:58
> *An:* pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> *Betreff:* Re: How do I replace a string in all text that pandoc 
> converts, i.e. how do I do this with a filter?
>
>  
>
> I've tried this: 
>
>  
>
> return {
>   {
>     Para = function (elem)
>       if elem.content[1].text == "{{helloworld}}" then
>         return pandoc.RawBlock('html','<div>abc</div>')
>       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-discus...-/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 
> <https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> -- 
> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com 
> <https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 12291 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* AW: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]                             ` <7cabb17e-9a2b-4251-bd95-c5415140c9adn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-12-05 23:49                               ` denis.maier-NSENcxR/0n0
       [not found]                                 ` <a5cc6e61614f4133870d4dabfa85d5fa-NSENcxR/0n0@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: denis.maier-NSENcxR/0n0 @ 2022-12-05 23:49 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

You are matching against the whole paragraph (para). So, when the first element in your paragraph matches your search string, you'll replace the whole paragraph with the return value of your function. (Which is a block element, not an inline element.)

Use the example from here instead:
https://pandoc.org/lua-filters.html#macro-substitution
________________________________________
Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im Auftrag von paulschillinger93-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <paulschillinger93-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Gesendet: Dienstag, 6. Dezember 2022 00:32:23
An: pandoc-discuss
Betreff: Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?

YES! that works! But can you tell me why it replaces the whole line? Can't I do this in running text?
Thanks!
return {
  {
    Para = function (elem)
      if elem.content[1].text == "{{helloworld}}" then
        return pandoc.RawBlock('latex','abc')
      else
        return elem
      end
    end,
  }
}




On Tuesday, December 6, 2022 at 12:09:13 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote:
Just your example filter:

```lua
return {
  {
    Para = function (elem)
      if elem.content[1].text == "{{helloworld}}" then
        return pandoc.RawBlock('html','<div>abc</div>')
      else
        return elem
      end
    end,
  }
}
```

The problematic line is this: return pandoc.RawBlock('html','<div>abc</div>')
This adds a raw block that will only come in to effect when your output format is html.

If your target ist latex, you’ll need something like this: return pandoc.RawBlock('latex','\\whatever{abc}')

```cmd
pandoc test.md -L filter.lua -t latex
asf

\whatever{abc}

asf
```


Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Gesendet: Dienstag, 6. Dezember 2022 00:04
An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?

No, my intended output is a PDF file. Does that change anything? Could you tell me what exactly you put in filter.lua?
Thanks!

On Monday, December 5, 2022 at 11:56:39 p.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote:
What exactly are you doing? Your output format is html? I’ve just tested this and it seems to work.

```cmd
C:\Users\denis\Downloads\filter>cat test.md
asf

{{helloworld}}

asf
C:\Users\denis\Downloads\filter>pandoc test.md
<p>asf</p>
<p>{{helloworld}}</p>
<p>asf</p>

C:\Users\denis\Downloads\filter>pandoc test.md -L filter.lua
<p>asf</p>
<div>abc</div>
<p>asf</p>
```
Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Gesendet: Montag, 5. Dezember 2022 18:58
An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?

I've tried this:

return {
  {
    Para = function (elem)
      if elem.content[1].text == "{{helloworld}}" then
        return pandoc.RawBlock('html','<div>abc</div>')
      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-discus...-/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<https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/a5cc6e61614f4133870d4dabfa85d5fa%40unibe.ch.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]                                 ` <a5cc6e61614f4133870d4dabfa85d5fa-NSENcxR/0n0@public.gmane.org>
@ 2022-12-05 23:51                                   ` -
       [not found]                                     ` <e0806b27-10df-48cd-ab8a-7806ac1c8039n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: - @ 2022-12-05 23:51 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 6780 bytes --]

I just tried that, thanks! That works :) But this doesn't appear to work 
for characters, like "==" which was the original goal. Am I missing some 
sort of escape characters?

On Tuesday, December 6, 2022 at 12:49:46 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote:

> You are matching against the whole paragraph (para). So, when the first 
> element in your paragraph matches your search string, you'll replace the 
> whole paragraph with the return value of your function. (Which is a block 
> element, not an inline element.)
>
> Use the example from here instead:
> https://pandoc.org/lua-filters.html#macro-substitution
> ________________________________________
> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im Auftrag 
> von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Gesendet: Dienstag, 6. Dezember 2022 00:32:23
> An: pandoc-discuss
> Betreff: Re: How do I replace a string in all text that pandoc converts, 
> i.e. how do I do this with a filter?
>
> YES! that works! But can you tell me why it replaces the whole line? Can't 
> I do this in running text?
> Thanks!
> return {
> {
> Para = function (elem)
> if elem.content[1].text == "{{helloworld}}" then
> return pandoc.RawBlock('latex','abc')
> else
> return elem
> end
> end,
> }
> }
>
>
>
>
> On Tuesday, December 6, 2022 at 12:09:13 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
> wrote:
> Just your example filter:
>
> ```lua
> return {
> {
> Para = function (elem)
> if elem.content[1].text == "{{helloworld}}" then
> return pandoc.RawBlock('html','<div>abc</div>')
> else
> return elem
> end
> end,
> }
> }
> ```
>
> The problematic line is this: return 
> pandoc.RawBlock('html','<div>abc</div>')
> This adds a raw block that will only come in to effect when your output 
> format is html.
>
> If your target ist latex, you’ll need something like this: return 
> pandoc.RawBlock('latex','\\whatever{abc}')
>
> ```cmd
> pandoc test.md -L filter.lua -t latex
> asf
>
> \whatever{abc}
>
> asf
> ```
>
>
> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag 
> von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> Gesendet: Dienstag, 6. Dezember 2022 00:04
> An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> Betreff: Re: How do I replace a string in all text that pandoc converts, 
> i.e. how do I do this with a filter?
>
> No, my intended output is a PDF file. Does that change anything? Could you 
> tell me what exactly you put in filter.lua?
> Thanks!
>
> On Monday, December 5, 2022 at 11:56:39 p.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
> wrote:
> What exactly are you doing? Your output format is html? I’ve just tested 
> this and it seems to work.
>
> ```cmd
> C:\Users\denis\Downloads\filter>cat test.md
> asf
>
> {{helloworld}}
>
> asf
> C:\Users\denis\Downloads\filter>pandoc test.md
> <p>asf</p>
> <p>{{helloworld}}</p>
> <p>asf</p>
>
> C:\Users\denis\Downloads\filter>pandoc test.md -L filter.lua
> <p>asf</p>
> <div>abc</div>
> <p>asf</p>
> ```
> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag 
> von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> Gesendet: Montag, 5. Dezember 2022 18:58
> An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> Betreff: Re: How do I replace a string in all text that pandoc converts, 
> i.e. how do I do this with a filter?
>
> I've tried this:
>
> return {
> {
> Para = function (elem)
> if elem.content[1].text == "{{helloworld}}" then
> return pandoc.RawBlock('html','<div>abc</div>')
> 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-discus...-/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
> <
> https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
> --
> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com
> <
> https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
>
> --
> 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:
> pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com
> <
> https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
>

-- 
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/e0806b27-10df-48cd-ab8a-7806ac1c8039n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 11492 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]                                     ` <e0806b27-10df-48cd-ab8a-7806ac1c8039n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-12-05 23:52                                       ` -
       [not found]                                         ` <272ed09b-4245-4128-94a2-50cf5f67e10dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: - @ 2022-12-05 23:52 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 7342 bytes --]

Barring that, can't I use something like "> = string.gsub("Hello banana", 
"banana", "Lua user")", if so how would I do that? I got that example from 
http://lua-users.org/wiki/StringLibraryTutorial

On Tuesday, December 6, 2022 at 12:51:09 a.m. UTC+1 - wrote:

> I just tried that, thanks! That works :) But this doesn't appear to work 
> for characters, like "==" which was the original goal. Am I missing some 
> sort of escape characters?
>
> On Tuesday, December 6, 2022 at 12:49:46 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
> wrote:
>
>> You are matching against the whole paragraph (para). So, when the first 
>> element in your paragraph matches your search string, you'll replace the 
>> whole paragraph with the return value of your function. (Which is a block 
>> element, not an inline element.) 
>>
>> Use the example from here instead: 
>> https://pandoc.org/lua-filters.html#macro-substitution 
>> ________________________________________ 
>> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im 
>> Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
>> Gesendet: Dienstag, 6. Dezember 2022 00:32:23 
>> An: pandoc-discuss 
>> Betreff: Re: How do I replace a string in all text that pandoc converts, 
>> i.e. how do I do this with a filter? 
>>
>> YES! that works! But can you tell me why it replaces the whole line? 
>> Can't I do this in running text? 
>> Thanks! 
>> return { 
>> { 
>> Para = function (elem) 
>> if elem.content[1].text == "{{helloworld}}" then 
>> return pandoc.RawBlock('latex','abc') 
>> else 
>> return elem 
>> end 
>> end, 
>> } 
>> } 
>>
>>
>>
>>
>> On Tuesday, December 6, 2022 at 12:09:13 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
>> wrote: 
>> Just your example filter: 
>>
>> ```lua 
>> return { 
>> { 
>> Para = function (elem) 
>> if elem.content[1].text == "{{helloworld}}" then 
>> return pandoc.RawBlock('html','<div>abc</div>') 
>> else 
>> return elem 
>> end 
>> end, 
>> } 
>> } 
>> ``` 
>>
>> The problematic line is this: return 
>> pandoc.RawBlock('html','<div>abc</div>') 
>> This adds a raw block that will only come in to effect when your output 
>> format is html. 
>>
>> If your target ist latex, you’ll need something like this: return 
>> pandoc.RawBlock('latex','\\whatever{abc}') 
>>
>> ```cmd 
>> pandoc test.md -L filter.lua -t latex 
>> asf 
>>
>> \whatever{abc} 
>>
>> asf 
>> ``` 
>>
>>
>> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im 
>> Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
>> Gesendet: Dienstag, 6. Dezember 2022 00:04 
>> An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 
>> Betreff: Re: How do I replace a string in all text that pandoc converts, 
>> i.e. how do I do this with a filter? 
>>
>> No, my intended output is a PDF file. Does that change anything? Could 
>> you tell me what exactly you put in filter.lua? 
>> Thanks! 
>>
>> On Monday, December 5, 2022 at 11:56:39 p.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
>> wrote: 
>> What exactly are you doing? Your output format is html? I’ve just tested 
>> this and it seems to work. 
>>
>> ```cmd 
>> C:\Users\denis\Downloads\filter>cat test.md 
>> asf 
>>
>> {{helloworld}} 
>>
>> asf 
>> C:\Users\denis\Downloads\filter>pandoc test.md 
>> <p>asf</p> 
>> <p>{{helloworld}}</p> 
>> <p>asf</p> 
>>
>> C:\Users\denis\Downloads\filter>pandoc test.md -L filter.lua 
>> <p>asf</p> 
>> <div>abc</div> 
>> <p>asf</p> 
>> ``` 
>> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im 
>> Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
>> Gesendet: Montag, 5. Dezember 2022 18:58 
>> An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 
>> Betreff: Re: How do I replace a string in all text that pandoc converts, 
>> i.e. how do I do this with a filter? 
>>
>> I've tried this: 
>>
>> return { 
>> { 
>> Para = function (elem) 
>> if elem.content[1].text == "{{helloworld}}" then 
>> return pandoc.RawBlock('html','<div>abc</div>') 
>> 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-discus...-/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
>> <
>> https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>>
>> -- 
>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com
>> <
>> https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>>
>>
>> -- 
>> 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:
>> pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>. 
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com
>> <
>> https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>>
>>
>

-- 
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/272ed09b-4245-4128-94a2-50cf5f67e10dn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 11798 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]                                         ` <272ed09b-4245-4128-94a2-50cf5f67e10dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-12-06  0:02                                           ` -
       [not found]                                             ` <6d25bb08-224d-4f01-8eba-3f1c55d19e83n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: - @ 2022-12-06  0:02 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 7748 bytes --]

I've narrowed it down! The issue isn't the characters but that they're 
technically "part" of the word. How do I replace PART of a word?
Thanks!

On Tuesday, December 6, 2022 at 12:52:05 a.m. UTC+1 - wrote:

> Barring that, can't I use something like "> = string.gsub("Hello banana", 
> "banana", "Lua user")", if so how would I do that? I got that example from 
> http://lua-users.org/wiki/StringLibraryTutorial
>
> On Tuesday, December 6, 2022 at 12:51:09 a.m. UTC+1 - wrote:
>
>> I just tried that, thanks! That works :) But this doesn't appear to work 
>> for characters, like "==" which was the original goal. Am I missing some 
>> sort of escape characters?
>>
>> On Tuesday, December 6, 2022 at 12:49:46 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
>> wrote:
>>
>>> You are matching against the whole paragraph (para). So, when the first 
>>> element in your paragraph matches your search string, you'll replace the 
>>> whole paragraph with the return value of your function. (Which is a block 
>>> element, not an inline element.) 
>>>
>>> Use the example from here instead: 
>>> https://pandoc.org/lua-filters.html#macro-substitution 
>>> ________________________________________ 
>>> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im 
>>> Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
>>> Gesendet: Dienstag, 6. Dezember 2022 00:32:23 
>>> An: pandoc-discuss 
>>> Betreff: Re: How do I replace a string in all text that pandoc converts, 
>>> i.e. how do I do this with a filter? 
>>>
>>> YES! that works! But can you tell me why it replaces the whole line? 
>>> Can't I do this in running text? 
>>> Thanks! 
>>> return { 
>>> { 
>>> Para = function (elem) 
>>> if elem.content[1].text == "{{helloworld}}" then 
>>> return pandoc.RawBlock('latex','abc') 
>>> else 
>>> return elem 
>>> end 
>>> end, 
>>> } 
>>> } 
>>>
>>>
>>>
>>>
>>> On Tuesday, December 6, 2022 at 12:09:13 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
>>> wrote: 
>>> Just your example filter: 
>>>
>>> ```lua 
>>> return { 
>>> { 
>>> Para = function (elem) 
>>> if elem.content[1].text == "{{helloworld}}" then 
>>> return pandoc.RawBlock('html','<div>abc</div>') 
>>> else 
>>> return elem 
>>> end 
>>> end, 
>>> } 
>>> } 
>>> ``` 
>>>
>>> The problematic line is this: return 
>>> pandoc.RawBlock('html','<div>abc</div>') 
>>> This adds a raw block that will only come in to effect when your output 
>>> format is html. 
>>>
>>> If your target ist latex, you’ll need something like this: return 
>>> pandoc.RawBlock('latex','\\whatever{abc}') 
>>>
>>> ```cmd 
>>> pandoc test.md -L filter.lua -t latex 
>>> asf 
>>>
>>> \whatever{abc} 
>>>
>>> asf 
>>> ``` 
>>>
>>>
>>> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im 
>>> Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
>>> Gesendet: Dienstag, 6. Dezember 2022 00:04 
>>> An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 
>>> Betreff: Re: How do I replace a string in all text that pandoc converts, 
>>> i.e. how do I do this with a filter? 
>>>
>>> No, my intended output is a PDF file. Does that change anything? Could 
>>> you tell me what exactly you put in filter.lua? 
>>> Thanks! 
>>>
>>> On Monday, December 5, 2022 at 11:56:39 p.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
>>> wrote: 
>>> What exactly are you doing? Your output format is html? I’ve just tested 
>>> this and it seems to work. 
>>>
>>> ```cmd 
>>> C:\Users\denis\Downloads\filter>cat test.md 
>>> asf 
>>>
>>> {{helloworld}} 
>>>
>>> asf 
>>> C:\Users\denis\Downloads\filter>pandoc test.md 
>>> <p>asf</p> 
>>> <p>{{helloworld}}</p> 
>>> <p>asf</p> 
>>>
>>> C:\Users\denis\Downloads\filter>pandoc test.md -L filter.lua 
>>> <p>asf</p> 
>>> <div>abc</div> 
>>> <p>asf</p> 
>>> ``` 
>>> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im 
>>> Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
>>> Gesendet: Montag, 5. Dezember 2022 18:58 
>>> An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 
>>> Betreff: Re: How do I replace a string in all text that pandoc converts, 
>>> i.e. how do I do this with a filter? 
>>>
>>> I've tried this: 
>>>
>>> return { 
>>> { 
>>> Para = function (elem) 
>>> if elem.content[1].text == "{{helloworld}}" then 
>>> return pandoc.RawBlock('html','<div>abc</div>') 
>>> 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-discus...-/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
>>> <
>>> https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>>>
>>> -- 
>>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com
>>> <
>>> https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>>>
>>>
>>> -- 
>>> 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:
>>> pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>. 
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com
>>> <
>>> https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>>>
>>>
>>

-- 
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/6d25bb08-224d-4f01-8eba-3f1c55d19e83n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 12540 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* AW: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]                                             ` <6d25bb08-224d-4f01-8eba-3f1c55d19e83n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-12-06  9:59                                               ` denis.maier-NSENcxR/0n0
       [not found]                                                 ` <3db81523c80944f3a81a18f25166124f-NSENcxR/0n0@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: denis.maier-NSENcxR/0n0 @ 2022-12-06  9:59 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 8976 bytes --]

Sorry, I haven’t been following from the beginning. Can you provide a complete example. What’s your input ? What’s the desired output ?

Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von paulschillinger93-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Gesendet: Dienstag, 6. Dezember 2022 01:03
An: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?

I've narrowed it down! The issue isn't the characters but that they're technically "part" of the word. How do I replace PART of a word?
Thanks!

On Tuesday, December 6, 2022 at 12:52:05 a.m. UTC+1 - wrote:
Barring that, can't I use something like "> = string.gsub("Hello banana", "banana", "Lua user")", if so how would I do that? I got that example from http://lua-users.org/wiki/StringLibraryTutorial
On Tuesday, December 6, 2022 at 12:51:09 a.m. UTC+1 - wrote:
I just tried that, thanks! That works :) But this doesn't appear to work for characters, like "==" which was the original goal. Am I missing some sort of escape characters?
On Tuesday, December 6, 2022 at 12:49:46 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org<mailto:denis...-NSENcxR/0n0@public.gmane.org> wrote:
You are matching against the whole paragraph (para). So, when the first element in your paragraph matches your search string, you'll replace the whole paragraph with the return value of your function. (Which is a block element, not an inline element.)

Use the example from here instead:
https://pandoc.org/lua-filters.html#macro-substitution
________________________________________
Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>> im Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<mailto:paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> <paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<mailto:paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>>
Gesendet: Dienstag, 6. Dezember 2022 00:32:23
An: pandoc-discuss
Betreff: Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?

YES! that works! But can you tell me why it replaces the whole line? Can't I do this in running text?
Thanks!
return {
{
Para = function (elem)
if elem.content[1].text == "{{helloworld}}" then
return pandoc.RawBlock('latex','abc')
else
return elem
end
end,
}
}




On Tuesday, December 6, 2022 at 12:09:13 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org<mailto:denis...-NSENcxR/0n0@public.gmane.org> wrote:
Just your example filter:

```lua
return {
{
Para = function (elem)
if elem.content[1].text == "{{helloworld}}" then
return pandoc.RawBlock('html','<div>abc</div>')
else
return elem
end
end,
}
}
```

The problematic line is this: return pandoc.RawBlock('html','<div>abc</div>')
This adds a raw block that will only come in to effect when your output format is html.

If your target ist latex, you’ll need something like this: return pandoc.RawBlock('latex','\\whatever{abc}')

```cmd
pandoc test.md -L filter.lua -t latex
asf

\whatever{abc}

asf
```


Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>> Im Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<mailto:paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Gesendet: Dienstag, 6. Dezember 2022 00:04
An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-...@googlegroups.com>>
Betreff: Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?

No, my intended output is a PDF file. Does that change anything? Could you tell me what exactly you put in filter.lua?
Thanks!

On Monday, December 5, 2022 at 11:56:39 p.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org<mailto:denis...-NSENcxR/0n0@public.gmane.org> wrote:
What exactly are you doing? Your output format is html? I’ve just tested this and it seems to work.

```cmd
C:\Users\denis\Downloads\filter>cat test.md
asf

{{helloworld}}

asf
C:\Users\denis\Downloads\filter>pandoc test.md
<p>asf</p>
<p>{{helloworld}}</p>
<p>asf</p>

C:\Users\denis\Downloads\filter>pandoc test.md -L filter.lua
<p>asf</p>
<div>abc</div>
<p>asf</p>
```
Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>> Im Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<mailto:paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Gesendet: Montag, 5. Dezember 2022 18:58
An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-...@googlegroups.com>>
Betreff: Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?

I've tried this:

return {
{
Para = function (elem)
if elem.content[1].text == "{{helloworld}}" then
return pandoc.RawBlock('html','<div>abc</div>')
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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discus...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discus...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discus...@googlegroups.com<mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org%3cmailto:pandoc-discus...@googlegroups.com>>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6d25bb08-224d-4f01-8eba-3f1c55d19e83n%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/6d25bb08-224d-4f01-8eba-3f1c55d19e83n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/3db81523c80944f3a81a18f25166124f%40unibe.ch.

[-- Attachment #2: Type: text/html, Size: 14627 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]                                                 ` <3db81523c80944f3a81a18f25166124f-NSENcxR/0n0@public.gmane.org>
@ 2022-12-06 10:55                                                   ` -
       [not found]                                                     ` <aedaf371-8dc3-4585-a16c-b4ef55967a7dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: - @ 2022-12-06 10:55 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 9793 bytes --]

OK, so I have markdown text that includes ==highlighted== words like that. 
I would like to convert ==highlighting== either to \hl{highlighting} so 
LaTeX can handle it, or to highlighting, i.e. remove the symbols, so that 
they just don't appear.

Thanks to you, I now have a working filter that looks like this:

return {
  {
    Str = function (elem)
      if elem.text == "highlighting" then
        return pandoc.Emph {pandoc.Str "highlighting"}
      else
        return elem
      end
    end,
  }
}

This filter takes all instances of highlighting and turns them into 
*highlighting*. However, ONLY if that's a whole word. If it's 
==highlighting== it doesn't touch it because that's seemingly technically 
another word as it contains other characters. In my case I would like to 
replace only the "==" but since they're attached to other characters, i.e. 
the actual word, the filter doesn't touch them.

That's where I'm at right now. I'm now looking for a modification of that 
filter so it also applies to parts of a word.
Any ideas on that?

Thanks!

On Tuesday, December 6, 2022 at 11:00:09 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote:

> Sorry, I haven’t been following from the beginning. Can you provide a 
> complete example. What’s your input ? What’s the desired output ?
>
>  
>
> *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> *Im 
> Auftrag von *paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> *Gesendet:* Dienstag, 6. Dezember 2022 01:03
> *An:* pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> *Betreff:* Re: How do I replace a string in all text that pandoc 
> converts, i.e. how do I do this with a filter?
>
>  
>
> I've narrowed it down! The issue isn't the characters but that they're 
> technically "part" of the word. How do I replace PART of a word?
>
> Thanks!
>
>  
>
> On Tuesday, December 6, 2022 at 12:52:05 a.m. UTC+1 - wrote:
>
> Barring that, can't I use something like "> = string.gsub("Hello banana", 
> "banana", "Lua user")", if so how would I do that? I got that example from 
> http://lua-users.org/wiki/StringLibraryTutorial
>
> On Tuesday, December 6, 2022 at 12:51:09 a.m. UTC+1 - wrote:
>
> I just tried that, thanks! That works :) But this doesn't appear to work 
> for characters, like "==" which was the original goal. Am I missing some 
> sort of escape characters?
>
> On Tuesday, December 6, 2022 at 12:49:46 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
> wrote:
>
> You are matching against the whole paragraph (para). So, when the first 
> element in your paragraph matches your search string, you'll replace the 
> whole paragraph with the return value of your function. (Which is a block 
> element, not an inline element.) 
>
> Use the example from here instead: 
> https://pandoc.org/lua-filters.html#macro-substitution 
> ________________________________________ 
> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im Auftrag 
> von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
> Gesendet: Dienstag, 6. Dezember 2022 00:32:23 
> An: pandoc-discuss 
> Betreff: Re: How do I replace a string in all text that pandoc converts, 
> i.e. how do I do this with a filter? 
>
> YES! that works! But can you tell me why it replaces the whole line? Can't 
> I do this in running text? 
> Thanks! 
> return { 
> { 
> Para = function (elem) 
> if elem.content[1].text == "{{helloworld}}" then 
> return pandoc.RawBlock('latex','abc') 
> else 
> return elem 
> end 
> end, 
> } 
> } 
>
>
>
>
> On Tuesday, December 6, 2022 at 12:09:13 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
> wrote: 
> Just your example filter: 
>
> ```lua 
> return { 
> { 
> Para = function (elem) 
> if elem.content[1].text == "{{helloworld}}" then 
> return pandoc.RawBlock('html','<div>abc</div>') 
> else 
> return elem 
> end 
> end, 
> } 
> } 
> ``` 
>
> The problematic line is this: return 
> pandoc.RawBlock('html','<div>abc</div>') 
> This adds a raw block that will only come in to effect when your output 
> format is html. 
>
> If your target ist latex, you’ll need something like this: return 
> pandoc.RawBlock('latex','\\whatever{abc}') 
>
> ```cmd 
> pandoc test.md -L filter.lua -t latex 
> asf 
>
> \whatever{abc} 
>
> asf 
> ``` 
>
>
> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag 
> von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
> Gesendet: Dienstag, 6. Dezember 2022 00:04 
> An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 
> Betreff: Re: How do I replace a string in all text that pandoc converts, 
> i.e. how do I do this with a filter? 
>
> No, my intended output is a PDF file. Does that change anything? Could you 
> tell me what exactly you put in filter.lua? 
> Thanks! 
>
> On Monday, December 5, 2022 at 11:56:39 p.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
> wrote: 
> What exactly are you doing? Your output format is html? I’ve just tested 
> this and it seems to work. 
>
> ```cmd 
> C:\Users\denis\Downloads\filter>cat test.md 
> asf 
>
> {{helloworld}} 
>
> asf 
> C:\Users\denis\Downloads\filter>pandoc test.md 
> <p>asf</p> 
> <p>{{helloworld}}</p> 
> <p>asf</p> 
>
> C:\Users\denis\Downloads\filter>pandoc test.md -L filter.lua 
> <p>asf</p> 
> <div>abc</div> 
> <p>asf</p> 
> ``` 
> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag 
> von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
> Gesendet: Montag, 5. Dezember 2022 18:58 
> An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 
> Betreff: Re: How do I replace a string in all text that pandoc converts, 
> i.e. how do I do this with a filter? 
>
> I've tried this: 
>
> return { 
> { 
> Para = function (elem) 
> if elem.content[1].text == "{{helloworld}}" then 
> return pandoc.RawBlock('html','<div>abc</div>') 
> 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-discus...-/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
> <
> https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>
> -- 
> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com
> <
> https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>
>
> -- 
> 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discus...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm>. 
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com
> <
> https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>
>
> -- 
> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/6d25bb08-224d-4f01-8eba-3f1c55d19e83n%40googlegroups.com 
> <https://groups.google.com/d/msgid/pandoc-discuss/6d25bb08-224d-4f01-8eba-3f1c55d19e83n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/aedaf371-8dc3-4585-a16c-b4ef55967a7dn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 17682 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter?
       [not found]                                                     ` <aedaf371-8dc3-4585-a16c-b4ef55967a7dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-12-06 11:51                                                       ` -
  0 siblings, 0 replies; 13+ messages in thread
From: - @ 2022-12-06 11:51 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 10557 bytes --]

IT HAS BEEN SOLVED :)
Using the lua.filter here: 
https://gist.github.com/tarleb/a0646da1834318d4f71a780edaf9f870 and this 
filter:
function Span (span) 
 if span.classes:includes 'mark' then 
 return {pandoc.RawInline('latex', '\\hl{')} .. span.content .. 
{pandoc.RawInline('latex', '}')
} 
end 
end
And now it works, but only because I updated pandoc. In the version that 
Linux Mint's repo had it wouldn't work.

On Tuesday, December 6, 2022 at 11:55:17 a.m. UTC+1 - wrote:

> OK, so I have markdown text that includes ==highlighted== words like that. 
> I would like to convert ==highlighting== either to \hl{highlighting} so 
> LaTeX can handle it, or to highlighting, i.e. remove the symbols, so that 
> they just don't appear.
>
> Thanks to you, I now have a working filter that looks like this:
>
> return {
>   {
>     Str = function (elem)
>       if elem.text == "highlighting" then
>         return pandoc.Emph {pandoc.Str "highlighting"}
>
>       else
>         return elem
>       end
>     end,
>   }
> }
>
> This filter takes all instances of highlighting and turns them into 
> *highlighting*. However, ONLY if that's a whole word. If it's 
> ==highlighting== it doesn't touch it because that's seemingly technically 
> another word as it contains other characters. In my case I would like to 
> replace only the "==" but since they're attached to other characters, i.e. 
> the actual word, the filter doesn't touch them.
>
> That's where I'm at right now. I'm now looking for a modification of that 
> filter so it also applies to parts of a word.
> Any ideas on that?
>
> Thanks!
>
> On Tuesday, December 6, 2022 at 11:00:09 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
> wrote:
>
>> Sorry, I haven’t been following from the beginning. Can you provide a 
>> complete example. What’s your input ? What’s the desired output ?
>>
>>  
>>
>> *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> *Im 
>> Auftrag von *paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> *Gesendet:* Dienstag, 6. Dezember 2022 01:03
>> *An:* pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
>> *Betreff:* Re: How do I replace a string in all text that pandoc 
>> converts, i.e. how do I do this with a filter?
>>
>>  
>>
>> I've narrowed it down! The issue isn't the characters but that they're 
>> technically "part" of the word. How do I replace PART of a word?
>>
>> Thanks!
>>
>>  
>>
>> On Tuesday, December 6, 2022 at 12:52:05 a.m. UTC+1 - wrote:
>>
>> Barring that, can't I use something like "> = string.gsub("Hello banana", 
>> "banana", "Lua user")", if so how would I do that? I got that example from 
>> http://lua-users.org/wiki/StringLibraryTutorial
>>
>> On Tuesday, December 6, 2022 at 12:51:09 a.m. UTC+1 - wrote:
>>
>> I just tried that, thanks! That works :) But this doesn't appear to work 
>> for characters, like "==" which was the original goal. Am I missing some 
>> sort of escape characters?
>>
>> On Tuesday, December 6, 2022 at 12:49:46 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
>> wrote:
>>
>> You are matching against the whole paragraph (para). So, when the first 
>> element in your paragraph matches your search string, you'll replace the 
>> whole paragraph with the return value of your function. (Which is a block 
>> element, not an inline element.) 
>>
>> Use the example from here instead: 
>> https://pandoc.org/lua-filters.html#macro-substitution 
>> ________________________________________ 
>> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im 
>> Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
>> Gesendet: Dienstag, 6. Dezember 2022 00:32:23 
>> An: pandoc-discuss 
>> Betreff: Re: How do I replace a string in all text that pandoc converts, 
>> i.e. how do I do this with a filter? 
>>
>> YES! that works! But can you tell me why it replaces the whole line? 
>> Can't I do this in running text? 
>> Thanks! 
>> return { 
>> { 
>> Para = function (elem) 
>> if elem.content[1].text == "{{helloworld}}" then 
>> return pandoc.RawBlock('latex','abc') 
>> else 
>> return elem 
>> end 
>> end, 
>> } 
>> } 
>>
>>
>>
>>
>> On Tuesday, December 6, 2022 at 12:09:13 a.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
>> wrote: 
>> Just your example filter: 
>>
>> ```lua 
>> return { 
>> { 
>> Para = function (elem) 
>> if elem.content[1].text == "{{helloworld}}" then 
>> return pandoc.RawBlock('html','<div>abc</div>') 
>> else 
>> return elem 
>> end 
>> end, 
>> } 
>> } 
>> ``` 
>>
>> The problematic line is this: return 
>> pandoc.RawBlock('html','<div>abc</div>') 
>> This adds a raw block that will only come in to effect when your output 
>> format is html. 
>>
>> If your target ist latex, you’ll need something like this: return 
>> pandoc.RawBlock('latex','\\whatever{abc}') 
>>
>> ```cmd 
>> pandoc test.md -L filter.lua -t latex 
>> asf 
>>
>> \whatever{abc} 
>>
>> asf 
>> ``` 
>>
>>
>> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im 
>> Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
>> Gesendet: Dienstag, 6. Dezember 2022 00:04 
>> An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 
>> Betreff: Re: How do I replace a string in all text that pandoc converts, 
>> i.e. how do I do this with a filter? 
>>
>> No, my intended output is a PDF file. Does that change anything? Could 
>> you tell me what exactly you put in filter.lua? 
>> Thanks! 
>>
>> On Monday, December 5, 2022 at 11:56:39 p.m. UTC+1 denis...-NSENcxR/0n0@public.gmane.org 
>> wrote: 
>> What exactly are you doing? Your output format is html? I’ve just tested 
>> this and it seems to work. 
>>
>> ```cmd 
>> C:\Users\denis\Downloads\filter>cat test.md 
>> asf 
>>
>> {{helloworld}} 
>>
>> asf 
>> C:\Users\denis\Downloads\filter>pandoc test.md 
>> <p>asf</p> 
>> <p>{{helloworld}}</p> 
>> <p>asf</p> 
>>
>> C:\Users\denis\Downloads\filter>pandoc test.md -L filter.lua 
>> <p>asf</p> 
>> <div>abc</div> 
>> <p>asf</p> 
>> ``` 
>> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im 
>> Auftrag von paulschi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
>> Gesendet: Montag, 5. Dezember 2022 18:58 
>> An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 
>> Betreff: Re: How do I replace a string in all text that pandoc converts, 
>> i.e. how do I do this with a filter? 
>>
>> I've tried this: 
>>
>> return { 
>> { 
>> Para = function (elem) 
>> if elem.content[1].text == "{{helloworld}}" then 
>> return pandoc.RawBlock('html','<div>abc</div>') 
>> 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-discus...-/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
>> <
>> https://groups.google.com/d/msgid/pandoc-discuss/3ae58adb-8789-4398-8ab0-fe1e6928e292n%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>>
>> -- 
>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com
>> <
>> https://groups.google.com/d/msgid/pandoc-discuss/e9cb34ca-b760-4ef6-9432-91d37f5e45c5n%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>>
>>
>> -- 
>> 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discus...@googlegroups.com>. 
>>
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com
>> <
>> https://groups.google.com/d/msgid/pandoc-discuss/7cabb17e-9a2b-4251-bd95-c5415140c9adn%40googlegroups.com?utm_medium=email&utm_source=footer>. 
>>
>>
>> -- 
>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/6d25bb08-224d-4f01-8eba-3f1c55d19e83n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/6d25bb08-224d-4f01-8eba-3f1c55d19e83n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/282dc553-743a-4623-9f68-897468f97a7bn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 18520 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-12-06 11:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AQHZCNHjf/ZLvnEKSku8rNPhS+hfuK5fg9cAgABjBzD///KPAIAAEQug///2x4CAABQqJv//8RSAAAAIb4AAAF/3gAAW7vkg>
     [not found] ` <AQHZCNHjf/ZLvnEKSku8rNPhS+hfuK5fg9cAgABjBzD///KPAIAAEQug///2x4CAABQqJg==>
     [not found]   ` <AQHZCNHjf/ZLvnEKSku8rNPhS+hfuK5fg9cAgABjBzD///KPAIAAEQug>
     [not found]     ` <AQHZCNHjf/ZLvnEKSku8rNPhS+hfuK5fg9cAgABjBzA=>
2022-12-05 17:49       ` How do I replace a string in all text that pandoc converts, i.e. how do I do this with a filter? -
     [not found]         ` <83eeff5c-8fc3-4ca3-862c-bb85790daabcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-12-05 17:58           ` -
     [not found]             ` <3ae58adb-8789-4398-8ab0-fe1e6928e292n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-12-05 22:56               ` AW: " denis.maier-NSENcxR/0n0
     [not found]                 ` <24509d5ca5844dbda07b3e77d86ab3f4-NSENcxR/0n0@public.gmane.org>
2022-12-05 23:04                   ` -
     [not found]                     ` <e9cb34ca-b760-4ef6-9432-91d37f5e45c5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-12-05 23:09                       ` AW: " denis.maier-NSENcxR/0n0
     [not found]                         ` <2faac96e448d4303b3ea0e12ef05dfbe-NSENcxR/0n0@public.gmane.org>
2022-12-05 23:32                           ` -
     [not found]                             ` <7cabb17e-9a2b-4251-bd95-c5415140c9adn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-12-05 23:49                               ` AW: " denis.maier-NSENcxR/0n0
     [not found]                                 ` <a5cc6e61614f4133870d4dabfa85d5fa-NSENcxR/0n0@public.gmane.org>
2022-12-05 23:51                                   ` -
     [not found]                                     ` <e0806b27-10df-48cd-ab8a-7806ac1c8039n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-12-05 23:52                                       ` -
     [not found]                                         ` <272ed09b-4245-4128-94a2-50cf5f67e10dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-12-06  0:02                                           ` -
     [not found]                                             ` <6d25bb08-224d-4f01-8eba-3f1c55d19e83n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-12-06  9:59                                               ` AW: " denis.maier-NSENcxR/0n0
     [not found]                                                 ` <3db81523c80944f3a81a18f25166124f-NSENcxR/0n0@public.gmane.org>
2022-12-06 10:55                                                   ` -
     [not found]                                                     ` <aedaf371-8dc3-4585-a16c-b4ef55967a7dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-12-06 11:51                                                       ` -

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).