Skip to content

Check the edge cases separately if the point is included in MinAllowedBlockVisitor

Alexander Chueshev requested to merge ac/enhance-trim-by-min-allowed-block into main

What does this merge request do and why?

We need to check the edge cases separately whether the point is included in MinAllowedBlockVisitor to support C-like languages.

In C-like languages, we end blocks with a } character, usually placing it on a new line. If the cursor is at the end of the previous line (which is often longer), the _is_point_included function returns False, which is an error

How to set up and validate locally

Prompt:

// This code has a filename of test.js and is written in JavaScript.
const newFunctionForValidatingEmail = (email) => {
  return emailRegex.test(email);
}

// For the mask XYZ
const writeStringBackwards = (inpStr) => {
  let outStr = '';
  for (let i = inpStr.length - 1; i >= 0; i--) {
    outStr += inpStr[i];
  }
  return outSt<cursor>

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
Edited by Alexander Chueshev

Merge request reports