Template file being ignored by writeStats

OK. I could narrow the problem, and produce it at will.

Case 1 : Original code : The problem occurs in partial crise.html.

<a href="{{ site.Params.cta.btnURL | relURL }}" class="btn btn-default btn-contact wow fadeInDown" data-wow-delay=".4s" data-wow-duration="500ms" title="Plus d'information">{{ site.Params.cta.btnText }}</a>

{{ partial "crise.html" . }}

Case 2 : Not working either : If I add the class in a href => not added to json.

<a href="{{ site.Params.cta.btnURL | relURL }}" class="crise btn btn-default btn-contact wow fadeInDown" data-wow-delay=".4s" data-wow-duration="500ms" title="Plus d'information">{{ site.Params.cta.btnText }}</a>

Case 3 : And here we go ! : If I add the same line but with only the crise class it works !!

<a href="{{ site.Params.cta.btnURL | relURL }}" class="crise">{{ site.Params.cta.btnText }}</a>

And it also add some other missing classes I had in my partial: “crise”, “crise-text”,“crise-titre”,

So it seem that the parsing was interrupted or something.

[EDIT]

FOUND THE CAUSE

I could narrow the problem.
When I remove the title=“Plus d’information” (simplified case 2) it works too !

So the minimal code to have the problem is this line :

<a  href="{{ site.Params.cta.btnURL | relURL }}" class="crise" title="Plus d'information">{{ site.Params.cta.btnText }}</a>

So the culprit seems title=“Plus d’information” clashing with something.
Strange

Same problem than OP

Yes, this is the same pattern than OP. Problem occurs when there is a ' in title value.
Whoa ! Nasty one.

[EDIT] Filled a bug in GitHub : Class not writen in hugo_stats.json when there is an apostrophe (') in (a href) title value. · Issue #7746 · gohugoio/hugo · GitHub