Why is JSFiddle using ligatures, and is this breaking my code? - jsfiddle

After posting some code on JSFiddle, I noticed that there appeared to be an errant space in my code. Upon trying to correct it I discovered that the problem is with rendering, not with what I entered, and saw that every instance of a lowercase f followed by a lowercase i resulted in a ligature connecting them. This would be fine if they weren't doing it to code. Less importantly: what is going on here, and what is causing this? More importantly: could this be the cause of my code not running?
The fiddle is here.

Related

how to add asterisk in block comments for vscode extension

Background: I am making a extension to use for a not well known coding language.
While creating a vscode extension, I have run into an issue with block comments. When creating a new line in the comment I was hoping to automate the process of adding and asterisk (*) and a space on a new line. The only way I have found to do this is with the on enter rules.
The issue that I have with this is that the on enter rules can only see the line above and after the cursor. As far as I can tell this could lead to inaccurate comments. One case could be if there was a multiplication issue stretching across multiple lines.
Am I thinking about this correctly, and if I am, are there any solutions to add this asterisk?

Getting reference error from appledoc when embedding code in comments

I have some code comments like this:
/**
How to use this method.
#discussion To use it, do something like the following
id hook = [[STDeallocHook alloc] initWithBlock:^{
// Do something when 'hook' is dealloced
}];
*/
So the code example is indented with 4 spaces. When I compile the docset with appledoc, it compiles correctly and shows the code as code in the API reference I generate. However back in XCode (Where I have appledoc creating warnings for issues in the doco) I get the warning:
Invalid [[STDeallocHook alloc] reference found hear STDeallocHook.h#16, unknown object: [STDeallocHook !
I think what's happening is that appledoc is looking for markdown links inside the code block.
How can I stop this warning from appearing?
I've been unable to stop it as well. It looks like it's been a known bug since 2011, but it's still broken.
Interestingly enough, I don't get it for everything. In a large code example, I'll only get a few of them... still haven't figured out how it determines to cause me grief or not...
Workarounds
This works around the warning, and looks fine in the generated documentation, but looks like crap in plain text: substitute the leading [ with the HTML escape code [
Future Fix
Supposedly, the mythical version 3 has addressed it, but I can't find any mention of an ETA for it. There is a "3.0exp1" branch from March 2012, and a "3.0dev" branch from October 2014.
If you have both the time and inclination, maybe you can see how it was fixed and patch it yourself (though the codebase has apparently changed a ton since then).
My Attempt
I felt unsatisfied with that answer, so, I went back and looked at the source code. First time in that code. It's not exactly easy to navigate... and none of the classes are documented, which I find quite strange, especially for a documentation tool.
Anyway, I think I know why I only get the warning sometimes. The parser treats all underscores as formatting markers. Thus, if it finds two of them in the same "block" of text, it splits them up. Since the code I tested on had category documentation, only the last one encountered in each "block" caused a warning... because all the others were treated as italics... and then ignored.
Also, it seems that I may be able to coerce it into skipping source-code blocks if they are marked as either...
#code
[self wjh_doSomething];
#endcode
or
```
[self wjh_doSomething];
```
or
~~~
[self wjh_doSomething];
~~~
The first is common in documentation blocks, the latter two in markdown.
It's a hack, but it seems to work. I sent a PR, which can be found here. Who knows if it will get accepted, but feel free to try it out yourself if you are so inclined.
I think I'll at least use it locally, as it cleans up a ton of warnings for me... and I may just go try to regenerate all my documented stuff to boot.
Edit
Well, I guess I should have gone and looked at the open PRs first. There seems to be a PR already sitting there that deals with the same issue, that has been there since May. It would have saved me time... but it was a little fun experimenting with it a bit ;-)
You may want to use that one... it seems to be simpler. Simpler is better, but I have not used that one and I'm not sure it completely ignores the blocks, but he seems to have quieted the warnings with his patch.
That one does not support #code/#endcode, which I'm glad to have.

Why is my vs2012 forcing extra parentheses

First, thank you for taking pity on me and reading this issue. I CANNOT for the life of me figure out what extension I might have installed that is causing this issue, but it is EXTREMELY cumbersome.
Whenever I begin to type code (VB I think it also occurs in C#), for example "For Each" once I hit the F it forces a set of parentheses. Which would look like F(), but because I keep typing it looks like F(or). This only occurs when coding inside code blocks like a function or a sub, but when I'm creating the function it does not occur. I've disabled any and all power tools and the like, or at least I'm 90% sure I've done this for all of them, and yet it still occurs.
I'm usually pretty proficient at digging about the net and finding the answer, but for this one I'm at a loss. There is just too many keywords involved, so all I see is non-related topics, or how to make the parentheses occur, not get rid of them.
If anyone can provide some steps to resolve this, I'm happy and eager to try them. It's just such a hassle to live with for right now.
If you think it is a Visual Studio extension, then start by disabling all of them and adding them back one at a time.
You can also run VS with the command line switched to disable features.
Devenv switches
The simple answer to the cause is the Codealike VS Extension. I logged a bug with them and hopefully they'll fix it soon

Microsoft.VisualBasic.Compatibility.VB6.GroupBoxArray' is obsolete

I was converting VB6 to VB.NET and now I came across this warning.
I made research before and the result is comment relate statement then add new code if necessary. it is so far so good until I faced an others problem that after comment.
I commented obsolete warning but it made AxMSFlexGrid Array.AxMSFlexGrid Array.GetIndex not found(I got 7 warning about this). The problem made the design view can not show fully which just like the following picture. http://chanmingman.files.wordpress.com/2011/06/couldfindtype.jpg
But no longer, I don't know what happen or what have I done, it gone.
I want to know why. Anyone came across this situation like that?
It is obsolete in .Net 4. That means it works now, but it might be removed in future versions of .Net. You should probably just leave it, since you are having trouble understanding the code.

SharePoint SPWeb.GetList seems to cause infinite loop?

So, I'm working on a SharePoint 2010 site that I developed, and I am trying to implement content type change propogation. During this process I seem to have found a strange bug. It seems my combination of calling methods in the SharePoint object model causes an infinite loop. You can see the code here (a little too large to post directly here I think): http://pastebin.com/U0qbLxpS. The key line there is on line 13. Leaving that line commented out results in an infinite loop of sub sites (starting at the first one). If I uncomment that line though, things seem to work fine. Does anyone have any experience with this bug or have any advice? Can anyone duplicate this issue for me? I was trying to use SPWeb.GetList("blah") instead of using SPWeb.List["blah"] directly as GetList is the recommended way to get access to a list (according to everything I have read). But this bug is a bit odd and is going to force me to leave a completely unrelated line of code in there (which leaves me feeling a bit strange).
My test site structure is this: http://localhost (main site) and http://localhost/ASubSite. The infinite loop happens on http://localhost/ASubSite and just keeps appending /ASubSite to the end and continuing the loop.
Thanks for any hope you can offer. If anyone can duplicate this, it would be great. Then maybe I can submit a bug to Microsoft about this. Otherwise, maybe this is just some strange combination of things I am doing combined with my site.