The checks for spaces and all that part can be replaced with a call to the stringify() function, but besides that it looks good to me.

On Tuesday, December 13, 2016 at 3:41:33 AM UTC-5, Scott Koga-Browes wrote:
I have created a python filter which replaces user-definable abbreviations (stored in a dictionary file and/or in a pandoc markdown source document's metadata) with their expansions. This is my attempt to replicate the kind of possibilities offered by LaTeX macros like \newcommand{\osh}{oshigami}, i.e. write '\osh', get 'oshigami' when the document is processed. In the past I've found this very useful for maintaining consistency throughout a document, and I missed this when I moved to writing in markdown.

I'm not really a programmer but - based on what I could understand from looking at other python filters out there - I managed to slap together something which seems to do what I want it to. However, I'm not really competent to judge whether it's fit for 'general consumption' and I am hoping there might be people out there willing to spend a few minutes to take a look at it and advise me on what needs to be done to make it 'roadworthy'. 

This is the repository: https://github.com/scokobro/pandoc-abbreviations

Thanks in advance!

--
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/5c74ed41-79f3-4566-9616-10b2e1224102%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.