Fixed a bug in live writer syntax highlighting plug-in.

Source: Internet
Author: User

People who often write blogs may be very familiar with live writer, while those who often write blogsProgramNot only is the member familiar with live writer, but may still be using a plug-in developed by @ shiyou. The latest version of this plug-in is v1.2, which was released by the author in 2009.12.14. This version solves some previous bugs, but there is still a bug that causes a very serious error, making the plug-in unavailable, and prompts "the plug-in Initialization is abnormal, object reference is not set as an object instance ". Here, the author provides a solution to this problem.

The reason for this problem is that the full name of the last language used is saved in the configuration file "<language> C ++ </language>. At the next startup, the corresponding highlighter will be found using the full name of the language, but the comparison is made using name. tolower. For some languages, the fullname and name of highlighter are not the same. For example, "C ++" is a fullname, but its name is "CPP". After tolower (), it becomes "CPP ", therefore, an error occurred while searching. null is returned. But the followingCodeIt is used directly without judgment. The empty object is invalid.

I have modified and compiled V1.1 and added v1.2 content. You can download it here. After decompression, copy the DLL file to the Plugins directory under the installation directory of Windows Live writer to overwrite the original file. This path is generally: "C: \ Program Files \ Windows Live \ writer \ plugins"

If you do not want to use this version, you can also temporarily bypass this issue, that is, before each start of writer, change <language> C ++ </language> in the configuration file to <language> CPP </language>.

The configuration file name is "profile_code.config ". The writer installation directory for V1.1; the "Windows Live \ writer \ plugins \ Cf. syntaxhighlighting" directory under "My Documents" for v1.2.

In addition, the author of this plug-in publishedSource code, Which can be downloaded from here. The source code modified by the author of this article (the proprietary version is v1.1.5) can be downloaded from here.

If you have any questions, please leave a comment to discuss with the author.
Or email me: Soli {at} QQ.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.