Skip to content

code commenting does not indent based on current selection #1026

@abose

Description

@abose

Describe the bug

pressing Ctrl+/ to comment code results in improper indentation. See Eg. below

Current behavior

function x(){
//    await page.goto(
//        "http://localhost:8000/test/SpecRunner.html?spec=all&category=unit"
//    );
};

Reproduction

On any JS or HTML file, press Ctrl-/ or click edit> toggle line comment

Expected behavior

function x(){
    // await page.goto(
    //    "http://localhost:8000/test/SpecRunner.html?spec=all&category=unit"
    // );
};

OS, Browser and Phoenix versions

all

logs or debug stack trace if any

No response

Additional context

This appears to be already supported in https://codemirror.net/5/doc/manual.html#addons , search for comment/comment.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions