lijunle / Vsxmd

VS XML documentation -> Markdown syntax.
MIT License
215 stars 51 forks source link

Bold and strong, italics and emphasized HTML markup not handled correctly #103

Open astrohart opened 1 year ago

astrohart commented 1 year ago

When I have a piece of documentation that has boldface in it, i.e., using the <b> and </b> or <strong> and </strong> HTML markup, e.g.,

        /// <summary>
        /// Handles the <see cref="E:System.Windows.Forms.ToolStripItem.Click" />
        /// event for the <b>Exit</b> command on the <b>File</b> menu.
        /// </summary>
        /// <param name="sender">
        /// Reference to an instance of the object that raised the event.
        /// </param>
        /// <param name="e">
        /// An <see cref="T:System.EventArgs" /> that contains the event data.
        /// </param>
        /// <remarks>
        /// This method is called to handle the message of the user clicking the
        /// Exit command on the File menu. This method saves the configuration
        /// and then closes this window. Since this window is the main window of
        /// the application, closing this window ends the lifecycle of the application.
        /// </remarks>
        private void OnFileExit(object sender, EventArgs e)
            => Close();

Notice, in particular, the documentation:

        /// <summary>
        /// Handles the <see cref="E:System.Windows.Forms.ToolStripItem.Click" />
        /// event for the <b>Exit</b> command on the <b>File</b> menu.
        /// </summary>

This translates to Markdown (by Vsxmd with the words Exit and File missing entirely from the generated content, i.e.:

image

In the picture above, notice how the words Exit and File are missing (and not bolded in) on the Markdown in the Summary section for the OnFileExit method's documentation.

The sentence reads:

Handles the   event for the  command on the menu.

When it should say

Handles the Click event for the Exit command on the File menu.

I suspect that the text between <i> and </i> and <em> or </em> is not being translated into markdown either.

<b> and <strong> should be turned into ** in Markdown and <i> and <em> (for emphasized) should be turned into _ in markdown.