On Thu, Oct 12, 2017 at 11:20 AM Kaushal Modi <kaushal.m...@gmail.com> wrote:
> On Thu, Oct 12, 2017 at 11:01 AM Nicolas Goaziou <m...@nicolasgoaziou.fr> > wrote: > >> Why do you consider it to be a regression? IIRC, the change allowed to >> use zero-width space as a way to escape markup. > > Also I spent few hours trying to understand why (setq org-emphasis-regexp-components '("-[:space:]('\"{" ;prematch allowed "-[:space:].,:!?;'\")}\\[" ;postmatch allowed " \t\r\n" ;border *not* allowed "." ;body 20)) ;newlines seems to resolve this issue.. I just changed the "border not allowed" regexp from "[:space:]" to " \t\r\n". I spent few hours, using edebug, message based debugging but couldn't figure out. If I try this sandbox method to debug: (dolist (str '("=title = \"foo\"= ~title = \"foo\"~")) (message "String: %s" str) (let* ((working-verbatim-re "\\([-[:space:]('\"{]\\|^\\)\\(\\(?3:[=~]\\)\\([^ \n]\\|[^ \n].*?\\(?:\n.*?\\)\\{0,1\\}[^ \n]\\)\\3\\)\\([-[:space:].,:!?;'\")}\\[]\\|$\\)") (bad-verbatim-re "\\([-[:space:]('\"{]\\|^\\)\\(\\([=~]\\)\\([^[:space:]]\\|[^[:space:]].*?\\(?:\n.*?\\)\\{0,1\\}[^[:space:]]\\)\\3\\)\\([-[:space:].,:!?;'\")}\\[]\\|$\\)") (using-working-verbatim-re (string-match-p working-verbatim-re str)) (using-bad-verbatim-re (string-match-p bad-verbatim-re str)) (match? (equal using-working-verbatim-re using-bad-verbatim-re))) (message ".. working match %S" using-working-verbatim-re) (message ".. bad match %S" using-bad-verbatim-re) (message ".. match? %S" match?))) Both good and "bad" regexp are matching that test string. So don't know how exactly this commit is breaking this.. but I know for sure that reverting org-emphasis-regexp-components to the earlier value fixes things. -- Kaushal Modi