Subject: Re: bug#27391: 25.2.50; utf-8 coding cookie is not applied on some specific markdown file

From: Vincent Belaïche <[email-masked]>
Date: Fri, 16 Jun 2017 21:15:37 +0200

Le 16/06/2017 à 20:38, Eli Zaretskii a écrit :
>> From: [email-masked] (Vincent Belaïche)
>> Cc: Vincent Belaïche <[email-masked]>
>> Date: Fri, 16 Jun 2017 16:08:09 +0200
>>
>> Attached is the file causing the issue. Recipe is just to visit the file
>> with emacs -q, and you see that the encoding is not taken.
> Your fancy comment causes this: remove the leading '[' and the problem
> goes away.  Looks like regex-quoting that somehow misfires.

After some investigation, it seems that the bug is in regexp-quote:

(regexp-quote "[comment]: # (")

outputs

"^\\[comment]: # ( "

instead of

"^\\[comment\\]: # ( "

   Vincent.

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus