Template rendering is not as expected due to function "toDisplayString"
Version
3.2.26
Reproduction link
Steps to reproduce
Double quotes are output in html structure when template renders ref type variable
For example, write in the .vue fileļ¼ sfc.vuejs.org/
Text with double quotes will appear in the html structure
What is expected?
Do not output double quotes when using ref type variable in template
What is actually happening?
In Shared.esm-bundle.js, the "todisplayString" function renders the variable into a string, where the Template uses the object type variable (RefImpl is one of them) will use the statement "JSON.stringify(val, replacer, 2) " Because Json.stringify will have double quotes after the variable of the string is the string
I hope that the obtained string is judged that if the result is a pure string format, it should delete the double quotes.
Here are key code: https://github.com/vuejs/vue-next/blob/eb721d49c004abf5eff0a4e7da71bad904aa6bac/packages/shared/src/toDisplayString.ts#L15-L23