From 48b8f77b24ca8e6614f48944e9125acba7bb8ea9 Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Sun, 21 Jan 2024 10:28:05 +0800 Subject: [PATCH] fix: mref mustach template description leak --- samples/seed/dotnet/project/Project/Class1.cs | 27 +++++++++++++++++++ templates/common/ManagedReference.common.js | 1 + 2 files changed, 28 insertions(+) diff --git a/samples/seed/dotnet/project/Project/Class1.cs b/samples/seed/dotnet/project/Project/Class1.cs index a99d4850fa0..3515f14c8d0 100644 --- a/samples/seed/dotnet/project/Project/Class1.cs +++ b/samples/seed/dotnet/project/Project/Class1.cs @@ -214,3 +214,30 @@ public void MyOperation() {} /// Another nice operation public void MoreOperations() {} } + +/// +/// Class representing a dog. +/// +public class Dog +{ + /// + /// Name of the dog. + /// + public string Name { get; } + + /// + /// Age of the dog. + /// + public int Age { get; } + + /// + /// Constructor. + /// + /// Name of the dog. + /// Age of the dog. + public Dog(string name, int age) + { + Name = name; + Age = age; + } +} diff --git a/templates/common/ManagedReference.common.js b/templates/common/ManagedReference.common.js index 24a9c64a970..79d88a07c96 100644 --- a/templates/common/ManagedReference.common.js +++ b/templates/common/ManagedReference.common.js @@ -198,6 +198,7 @@ function handleItem(vm, gitContribute, gitUrlPattern) { // set to null incase mustache looks up vm.summary = vm.summary || ""; + vm.description = vm.description || ""; vm.remarks = vm.remarks || ""; vm.conceptual = vm.conceptual || ""; vm.syntax = vm.syntax || "";