-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusted the classifier definitions so that "/** */" comments are not treated like XML documentation comments in script languages such as TypeScript which uses them for markdown comments. Fixes #215.
- Loading branch information
1 parent
12fd6f2
commit 9bbd3ea
Showing
10 changed files
with
89 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<topic id="04d6f71e-e4c3-41c2-b46e-fd0da1239843" revisionNumber="1"> | ||
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<introduction> | ||
<para>Changes in this release:</para> | ||
</introduction> | ||
|
||
<section> | ||
<content> | ||
<list class="bullet"> | ||
<listItem> | ||
<para>Adjusted the classifier definitions so that "<codeinline>/** */</codeinline>" comments are not | ||
treated like XML documentation comments in script languages such as TypeScript which uses them for markdown | ||
comments.</para> | ||
</listItem> | ||
|
||
</list> | ||
|
||
</content> | ||
</section> | ||
|
||
<relatedTopics> | ||
<link xlink:href="548dc6d7-6d08-4006-82b3-d5830be96f04" /> | ||
</relatedTopics> | ||
|
||
</developerConceptualDocument> | ||
</topic> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,8 @@ | |
// System : Visual Studio Spell Checker Package | ||
// File : ClassifierFactory.cs | ||
// Author : Eric Woodruff ([email protected]) | ||
// Updated : 09/17/2018 | ||
// Note : Copyright 2015-2018, Eric Woodruff, All rights reserved | ||
// Compiler: Microsoft Visual C# | ||
// Updated : 07/24/2020 | ||
// Note : Copyright 2015-2020, Eric Woodruff, All rights reserved | ||
// | ||
// This file contains a class used to generate classifiers for files that need to be spell checked | ||
// | ||
|
@@ -126,6 +125,7 @@ public static string ClassifierIdFor(string filename) | |
/// This is used to determine if the file contains C-style code based on its extension | ||
/// </summary> | ||
/// <param name="filename">The filename to check</param> | ||
/// <returns>True if it does, false if not</returns> | ||
public static bool IsCStyleCode(string filename) | ||
{ | ||
if(filename == null) | ||
|
@@ -142,10 +142,31 @@ public static bool IsCStyleCode(string filename) | |
return (extensionMap.TryGetValue(extension, out string id) && id.StartsWith("CStyle", StringComparison.Ordinal)); | ||
} | ||
|
||
/// <summary> | ||
/// This is used to see if a C-style language support old style XML documentation comments (/** ... */) | ||
/// </summary> | ||
/// <param name="filename">The filename to check</param> | ||
/// <returns>True if it does, false if not</returns> | ||
public static bool SupportsOldStyleXmlDocComments(string filename) | ||
{ | ||
string extension = Path.GetExtension(filename); | ||
|
||
if(extensionMap == null) | ||
LoadClassifierConfiguration(); | ||
|
||
if(!String.IsNullOrWhiteSpace(extension)) | ||
extension = extension.Substring(1); | ||
|
||
return extensionMap.TryGetValue(extension, out string id) && id != "None" && | ||
definitions.TryGetValue(id, out ClassifierDefinition definition) && | ||
!String.IsNullOrWhiteSpace((string)definition.Configuration.Attribute("OldStyleDocCommentDelimiter")); | ||
} | ||
|
||
/// <summary> | ||
/// This is used to determine if apostrophes are escaped such as in SQL literal strings | ||
/// </summary> | ||
/// <param name="filename">The filename to check</param> | ||
/// <returns>True if they are, false if not</returns> | ||
public static bool EscapesApostrophes(string filename) | ||
{ | ||
if(filename == null) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
// System : Visual Studio Spell Checker | ||
// File : AssemblyInfoShared.cs | ||
// Author : Eric Woodruff ([email protected]) | ||
// Updated : 06/11/2020 | ||
// Updated : 08/24/2020 | ||
// Note : Copyright 2013-2020, Eric Woodruff, All rights reserved | ||
// | ||
// Visual Studio spell checker common assembly attributes | ||
|
@@ -82,13 +82,13 @@ internal static partial class AssemblyInfo | |
// | ||
// This is used to set the assembly file version. This will change with each new release. MSIs only | ||
// support a Major value between 0 and 255 so we drop the century from the year on this one. | ||
public const string FileVersion = "20.6.11.0"; | ||
public const string FileVersion = "20.8.24.0"; | ||
|
||
// Common product version | ||
// | ||
// This may contain additional text to indicate Alpha or Beta states. The version number will always match | ||
// the file version above but includes the century on the year. | ||
public const string ProductVersion = "2020.6.11.0"; | ||
public const string ProductVersion = "2020.8.24.0"; | ||
|
||
// Assembly copyright information | ||
public const string Copyright = "Copyright \xA9 2013-2020, Eric Woodruff, All Rights Reserved.\r\n" + | ||
|