Thanks but i'm on windows.

Can you guide me about making the desired custom filter?

On Wednesday, August 2, 2017 at 6:39:32 PM UTC+4:30, John MacFarlane wrote:
Probably easier just to preprocess:

sed e 's/ / /g' input.html | pandoc -f html -t latex

+++ Karim Mohammadi [Aug 02 17 02:05 ]:
>   Hi. I want to convert html file file1.html to file1.tex. The html file
>   contains   .
>   How can i write an python script as a filter to remove non-breaking
>   space (&nbsp)?
>   This is my code:
>       #!/usr/bin/env python
>
>       """
>       Pandoc filter to removing   string from the text
>       """
>
>       from pandocfilters import toJSONFilter, Para
>
>       def debug(content):
>       file = open('debug.txt', 'w')
>       for item in content:
>       file.write("%s\n" % item)
>
>       def nbsp(key, value, format, meta):
>       uniString = unicode(value, "UTF-8")
>       uniString = value.replace(" ", " ")
>
>       return uniString
>
>       if __name__ == "__main__":
>       toJSONFilter(nbsp)
>    but calling command:
>   pandoc file1.html --filter ./nbsp.py -o file1.tex
>   give me some errors.
>
>   --
>   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 [1]pandoc-discus...@googlegroups.com.
>   To post to this group, send email to
>   [2]pandoc-...@googlegroups.com.
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/3be5ee09-90dc-41ad-
>   a368-9298b965dfaa%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-...@googlegroups.com
>   3. https://groups.google.com/d/msgid/pandoc-discuss/3be5ee09-90dc-41ad-a368-9298b965dfaa@googlegroups.com?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout

--
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.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/cc13bbea-06e5-422b-bcdd-cd9ba1c4cf95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.