Skip to content

Commit

Permalink
- code editor: improved syntax highlighting of strings that span mult…
Browse files Browse the repository at this point in the history
…iple lines (eg. inline style sheets)
  • Loading branch information
Christoph Hart committed Jul 22, 2024
1 parent 4562a14 commit d4543ca
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions hi_tools/mcl_editor/code_editor/LanguageManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,38 @@ mcl::FoldableLineRange::List LanguageManager::createLineRange(const juce::CodeDo

break;
}
case '"':
{
auto lineNumber = it.getLine();


while ((c = it.nextChar()) != 0)
{
if (c == '"')
{
auto thisLine = it.getLine();
if (thisLine > lineNumber)
{
mcl::FoldableLineRange::Ptr newElement = new mcl::FoldableLineRange(doc, { lineNumber, it.getLine() });

if (currentElement == nullptr)
{
lineRanges.add(newElement);
}
else
{
currentElement->children.add(newElement);
newElement->parent = currentElement;
//currentElement = newElement;
}
}

break;
}
}

break;
}
case '{':
{
auto thisLine = it.getLine();
Expand Down

0 comments on commit d4543ca

Please sign in to comment.