MCPcopy Create free account
hub / github.com/cloose/CuteMarkEd / decreaseHeadingLevel

Method decreaseHeadingLevel

app/markdownmanipulator.cpp:163–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163void MarkdownManipulator::decreaseHeadingLevel()
164{
165 QTextCursor cursor = editor->textCursor();
166 cursor.movePosition(QTextCursor::StartOfLine);
167
168 if ('#' == cursor.document()->characterAt(cursor.position())) {
169 cursor.beginEditBlock();
170 cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor);
171 cursor.removeSelectedText();
172 if (' ' == cursor.document()->characterAt(cursor.position())) {
173 cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor);
174 cursor.removeSelectedText();
175 }
176 cursor.endEditBlock();
177 }
178}
179
180void MarkdownManipulator::formatTextAsQuote()
181{

Callers 1

Calls 1

documentMethod · 0.45

Tested by

no test coverage detected