We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6089e5d commit b280310Copy full SHA for b280310
scripts/copy-discussions.js
@@ -124,8 +124,8 @@ function formatPollData(poll) {
124
options.forEach(option => {
125
const votes = option.totalVoteCount || 0;
126
if (votes > 0) {
127
- // Escape quotes in option text for Mermaid
128
- const escapedOption = option.option.replace(/"/g, '\\"');
+ // Escape backslashes and quotes in option text for Mermaid
+ const escapedOption = option.option.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
129
pollMarkdown += ` "${escapedOption}" : ${votes}\n`;
130
}
131
});
0 commit comments