MCPcopy Create free account
hub / github.com/cpeditor/cpeditor / toggleComment

Method toggleComment

src/Editor/CodeEditor.cpp:622–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620}
621
622void CodeEditor::toggleComment()
623{
624 const QString comment = languageRepo->singleLineCommentToken();
625
626 if (!removeInEachLineOfSelection(QRegularExpression("^\\s*(" + comment + " ?)"), false))
627 {
628 addInEachLineOfSelection(QRegularExpression("\\S|^\\s*$"), comment + " ");
629 }
630}
631
632void CodeEditor::toggleBlockComment()
633{

Callers 1

Calls 1

Tested by

no test coverage detected