Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] Code sections isn't working for Javascript language #252

Open
TaylorHo opened this issue Jul 25, 2023 · 1 comment
Open

[BUG] Code sections isn't working for Javascript language #252

TaylorHo opened this issue Jul 25, 2023 · 1 comment

Comments

@TaylorHo
Copy link

I tested with Java, Dart, and Javascript. Javascript was the only one of those languages where the sections didn't work.

I was trying to make the code read-only with controller.readOnlySectionNames = {'section1'};.

Dart example:

final controller = CodeController(
    text: '''
          // [START section1]
          final String test = "testing here";
          // [END section1]
          ''',
    language: dart,
    namedSectionParser: const BracketsStartEndNamedSectionParser(),
  );

Result:
Screenshot from 2023-07-25 20-53-40


Javascript example:

final controller = CodeController(
    text: '''
          // [START section1]
          console.log("teste");
          // [END section1]
          ''',
    language: javascript,
    namedSectionParser: const BracketsStartEndNamedSectionParser(),
  );

Result:
Screenshot from 2023-07-25 20-52-09

@ron-diesel
Copy link

I have the same issue

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants