MartinPacker / md2pptx

Markdown To PowerPoint converter
MIT License
222 stars 35 forks source link

Keep script from crashing (if no match was found) #9

Closed 42sol-eu closed 4 years ago

42sol-eu commented 4 years ago

Please close if this makes no sense to you

    # [Issue 9](https://github.com/MartinPacker/md2pptx/issues/9)
    if matchInfo == None:
        continue 
        # > NOTE: 
        # Traceback (most recent call last):
        # File "md2pptx", line 1997, in <module>
        #    name = matchInfo.group(1).strip()
        # AttributeError: 'NoneType' object has no attribute 'group'
MartinPacker commented 4 years ago

Would like to fix. Can you give me an example of input that causes the crash? (Until then I'm not sure what the correct fix would be.) Thanks!

42sol-eu commented 4 years ago

my problem was an empty input (not loading the file cause of the path issue)

I will look something up if you like. There is surely a case that produces the same effect.

MartinPacker commented 4 years ago

If I look at that line it seems to be parsing a metadata line. To do that the metadata line must exist - and must look like a metadata line i.e. key:value

Can you give me an example file?

42sol-eu commented 4 years ago

Fixed with the "No Input Data found" in v1.0 (I could not get the same error results)