pindexis / marker

The terminal command palette
MIT License
2.02k stars 106 forks source link

Unescaped left brace in regex is deprecated #32

Closed CRTX closed 6 years ago

CRTX commented 7 years ago

When I push ctrl + t I get the following error:

Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/{{ <-- HERE .+?}}/ at -e line 1.

Using Ubuntu 16.04 that comes with Perl 5 version 22. Bash version 4.3.46.

dj95 commented 7 years ago

Same here with Perl 5 version 24, Bash 4.4.12 and Python 3.6.0

liangguohuan commented 7 years ago

The reason i found here In perl v5.22, using a literal { in a regular expression was deprecated, and will emit a warning if it isn't escaped: {. In v5.26, this won't just warn, it'll cause a syntax error.

Ubuntu 16.04 , the default perl version is v5.22.1 When i got this error, It suddenly occurred to me that maybe xampp has lower version perl. So i type /opt/lampp/bin/perl -v and get v5.16.3 in xampp version 7.0.9-0, and then i create a soft link via command ln -s /opt/lampp/bin/perl /usr/local/bin, let the xampp's perl as default.

The problem is solved now.

But the best way is marker ower pindexis update the codes to be compatible with perl.

THE BEST WAY IS HERE NOW: vi ~/.marker/bin/marker.sh replace match=$(echo "$BUFFER" | perl -nle 'print $& if m{{{.+?}}}' | head -n 1) into match=$(echo "$BUFFER" | perl -nle 'print $& if m{\{\{.+?\}\}}' | head -n 1)

thejustsoul commented 6 years ago

https://github.com/pindexis/marker/issues/37#issuecomment-315638614

pindexis commented 6 years ago

fixed in latest (re-install or pull)