This feature should be disabled on Stack Overflow.
There are many languages which use --
as an operator. In C-family languages, it's the prefix or postfix decrement operator. In shell commands, it's sometimes used to separate argument groups.
For example, consider the question Why do we use double dash in "git checkout -- ."?
In code, it's written as two hyphen-dashes.
In the automatic link above, it's displayed as two hyphen-dashes.
In the page <title>
, it's displayed as two hyphen-dashes.
However, in the question page's <h1>
, it's displayed as an em dash.
In question lists, it is also displayed as an em dash.
Stack Overflow is primary a research resource. Mangling semantically important content for the sake of a bit of typographic flair is not the appropriate trade off. The typographic flair isn't even applied consistently, so that desired isn't being met either.
For a more data-driven argument, let's look at the most recent questions on Stack Overflow to which this transformation would apply.
SELECT
TOP 1000 Title, Id as [Post Link]
FROM Posts
WHERE PostTypeId = 1 AND Title Like '%-- %'
ORDER BY Id DESC
- flask py2neo --- ValueError: Node (:U {}) does not belong to this graph
NEUTRAL
Here it's being used to delimit tags in the title, which aren't supposed to be there. If the title were fixed, it wouldn't apply. - Reformat a dataframe using the melt() function (reshape2 package): Error message [ reached 'max' / getOption("max.print") -- omitted 256 rows ]
HAMRFUL
Mangles a specific error message. - Mongoid audit require': cannot load such file -- kaminari (LoadError)
HAMRFUL
Mangles a specific error message. - How to solve terminal error `require': cannot load such file -- rubygems.rb
HAMRFUL
Mangles a specific error message. - If innerHTML includes x, y, z, etc, then replaceWith -- need solution for multiple innerHTML variations
CORRECT
Grammatically questionable, but working as intended. - API Manager 2.6.0 won't start -- can't find carbon.xml file, but install went fine
CORRECT
- Git: I accidently did git checkout -- . so all my changes are gone, how can I get them back?
HARMFUL
Mangles a specific command. - New to Dialogflow -- How to implement Media Response
CORRECT
Grammatically questionable, but working as intended. - Copying Headers from CSV in Python not Working-- Delimiter Issue
CORRECT
Grammatically questionable, but working as intended. - No database found by BaseX GUI -- yet it shows from the console
CORRECT
So, in 4 of the last 10 cases it was applied, this feature did specific harm. In the remaining cases, it was usually being applied to titles were bad in the first place, and don't really need polishing so much as replacement.
document.getElementsByTagName('h1')[0].textContent[48] == '-'
on this question givestrue
.false
for me. Also, retrieving the page source with Python and parsing the HTML gives me a U+2014 EM DASH codepoint. Are you sure you are looking at the correct page? Besides, this is confirmed and known behaviour, intentional.