Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# verbatim string misinterpreted as documentation command #11

Open
TransientResponse opened this issue Dec 21, 2016 · 1 comment
Open

Comments

@TransientResponse
Copy link

It appears that having a C# verbatim string (string literal prefixed with @) in a method before the documentation of a property leads to the text in the string being included in the name of the property in the docs.

Example code:

public class Test
{
    /// <summary>Test method</summary>
    /// <returns>a string</returns>
    public static string Bar()
    {
        return new string(@"Ratione dolores qui voluptatem. Sunt facere dignissimos quod est odit. Omnis ipsum quos possimus quis aut. Voluptatem dolorem ut minima magnam aut modi.");
    }
    
    /// <summary>A property</summary>
    /// <value>a number</value>
    public static int Foo
    {
        get {return 3;}
    }
}

This code documents as:
image

First noticed in DoxyPress 1.2.5

@TransientResponse
Copy link
Author

Workaround for those interested: use a preprocessor block with a predfine in DoxyPress.
Example: #if !DOX_IGNORE followed by #endif around the line with the offending string with DOX_IGNORE added to DoxyPress's predefined macros in Build Settings -> Preprocessor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant