Oops, I broke Marked3 with a custom rule (attempted emulating iA Writer's comment syntax)

Viewed 26

So I was trying to add a cutom rule to honor iA Writer's // comments syntax. Now Marked crashes when I send it a file. On disk (or via streaming with The Archive). (Doesn't crash when I start Marked, only when I send it content.) Doesn't crash when I turn off the rule. Probably just a bad rule on my part. But not sure if crashing is the most graceful way of exiting. Doesn't crash when I disable the rule.

My rule consisted of looking for text //. And the action of doing a search and replace with ALL ticked. Search critiea was ^//.*$ and replace was left blank. Maybe this is wrong way of emulating this?

2 Answers

That sounds like a legitimate rule, and you're correcct that I would love to avoid crashing and rather provide an elegant error message if something goes wrong. Could you use Help->Report an Issue to export both your config and your custom rules and attach the zip for me to review?

Thanks for sending the crash log and config files. The main issue is that you misused "File Includes" when you actually wanted "Text Contains". File Includes is a way to test what external files have been included in a document, and I can see now that the labels are very misleading.

I've hardened the code around that to be more forgiving (not crash), and to make things a bit more clear.