In English, there are two schools of thought on this. The convention in the US is to have the punctuation be inside the quotes:
Alex said "Yes I will come."
"I will go," she said.
The British tend to move it outside the quotes, and also use single instead of double:
Alex said 'Yes, I will come'.
'I will go', she said.
Both are widely used and neither is more correct than the other. However, since SE is a US-based company, it seems reasonable that they'd follow US conventions.
The following is from this site, emphasis mine:
The above examples also show that the American style places commas and periods inside the quotation marks, even if they are not in the original material. British style (more sensibly) places unquoted periods and commas outside the quotation marks. For all other punctuation, the British and American styles are in agreement: unless the punctuation is part of the quoted material, it goes outside the quotation marks.