overleaf-textarea icon indicating copy to clipboard operation
overleaf-textarea copied to clipboard

Removed extra \cite

Open Jpfonseca opened this issue 4 years ago • 4 comments

As mentioned in robindijkhof#70 there is a bug with the ´\cite´ regular expression. With this PR I removed the expression that is more complex and also selects the ",." and then subtitutes it. Here is an visualization of the wrong expression.

Hope you can merge this into master in time to tomorrows release.

Jpfonseca avatar Apr 09 '22 16:04 Jpfonseca

This pr results in unit test failing. Therefore won't merge.

robindijkhof avatar Apr 09 '22 17:04 robindijkhof

It solves the issue... Maybe the unit test is wrong

Jpfonseca avatar Apr 09 '22 17:04 Jpfonseca

Added a link with the visualization of the expression removed to the first message. Here is the direct link too

Jpfonseca avatar Apr 09 '22 17:04 Jpfonseca

I'm pretty sure the unittests are not wrong. You can try them yourself. The problem with your expression virtualization is that other regex replaces are executed before. So the input is probably different.

robindijkhof avatar Apr 09 '22 20:04 robindijkhof