Closed j-oldroyd closed 7 years ago
Thanks for letting me know about this and for your kind compliments about the package. I will look into it, it's possible I fixed this at the end of the summer but forgot to release the change in a new version. In the meantime would you mind posting your updated snippet in a comment here? No problem if not. Thanks again.
Thanks for your response! I've pasted the snippet below. I believe the only change I made was the /g
near the end of the third line.
<snippet>
<content><![CDATA[
<theorem xml:id="theorem-${1/([A-Z])|(\s*<[^>]+>)|(\W+)/(?1\l$1:)(?2-:)(?3-:)/g}">
<title>$1</title>
<statement>$2</statement>
</theorem>$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>thm</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.xml.mbx</scope>
</snippet>
That is what is wrong with it, all right. Pretty much all the other snippets were even more seriously broken. I guess I added these after I had more or less finished writing MBX for the summer and didn't test them properly. Thanks for using the package and for letting me know about the bugs! I fixed them all in 0.4.5, which you should get via Package Control in a few hours.
Fixed in #29.
I think there may be an issue with the 'thm' snippet. For me, it's not converting the title into a proper xml:id like the 'sec' snippet does (for example, the 'thm' snippet isn't turning spaces into dashes). I changed the snippet on my computer to mirror the format for 'sec', and this seemed to fix things, but I don't know enough about what I'm doing to guarantee this won't just make something else worse. Thanks for making a great package!