<commit_before>#include "ui_sc_editor.h"

#include <stdlib.h>
#include <stddef.h>
#include <algorithm>
#include <map>
#include <vector>
#include <string>
#include <assert.h>

#include "scintilla/include/Platform.h"
#include "scintilla/include/Scintilla.h"
#include "scintilla/include/ILexer.h"
#include "scintilla/include/SciLexer.h"
#include "scintilla/src/lexlib/LexerModule.h"
#include "scintilla/src/lexlib/PropSetSimple.h"
#include "scintilla/src/CharClassify.h"
#include "scintilla/src/SplitVector.h"
#include "scintilla/src/Partitioning.h"
#include "scintilla/src/RunStyles.h"
#include "scintilla/src/Catalogue.h"
#include "scintilla/src/ContractionState.h"
#include "scintilla/src/CellBuffer.h"
#include "scintilla/src/KeyMap.h"
#include "scintilla/src/Indicator.h"
#include "scintilla/src/XPM.h"
#include "scintilla/src/LineMarker.h"
#include "scintilla/src/Style.h"
#include "scintilla/src/ViewStyle.h"
#include "scintilla/src/Decoration.h"
#include "scintilla/src/CharClassify.h"
#include "scintilla/src/CaseFolder.h"
#include "scintilla/src/Document.h"
#include "scintilla/src/Selection.h"
#include "scintilla/src/PositionCache.h"
#include "scintilla/src/EditModel.h"
#include "scintilla/src/MarginView.h"
#include "scintilla/src/EditView.h"
#include "scintilla/src/Editor.h"

#include "tinyxml2/tinyxml2.h"

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

bool htmlToColour(ColourDesired& colour, const char* html)
{
#if 1 // Built In
    colour.Set(html);
    colour.Set(colour.AsLong() | ((uint32_t)0xFF << 24)); // ColourDesired is lame in that it never sets the alpha channel..
    return true;
#else
    const char* start = html;
    if (*start == '#')
        ++start;

    const size_t size = strlen(start);
    if (size == 6)
    {
        // 8 bits per channel<commit_msg>Win64 fix<commit_after>#include "ui_sc_editor.h"

#include <stdlib.h>
#include <stddef.h>
#include <algorithm>
#include <map>
#include <vector>
#include <string>
#include <assert.h>

#include "scintilla/include/Platform.h"
#include "scintilla/include/Scintilla.h"
#include "scintilla/include/ILexer.h"
#include "scintilla/include/SciLexer.h"
#include "scintilla/src/lexlib/LexerModule.h"
#include "scintilla/src/lexlib/PropSetSimple.h"
#include "scintilla/src/CharClassify.h"
#include "scintilla/src/SplitVector.h"
#include "scintilla/src/Partitioning.h"
#include "scintilla/src/RunStyles.h"
#include "scintilla/src/Catalogue.h"
#include "scintilla/src/ContractionState.h"
#include "scintilla/src/CellBuffer.h"
#include "scintilla/src/KeyMap.h"
#include "scintilla/src/Indicator.h"
#include "scintilla/src/XPM.h"
#include "scintilla/src/LineMarker.h"
#include "scintilla/src/Style.h"
#include "scintilla/src/ViewStyle.h"
#include "scintilla/src/Decoration.h"
#include "scintilla/src/CharClassify.h"
#include "scintilla/src/CaseFolder.h"
#include "scintilla/src/Document.h"
#include "scintilla/src/Selection.h"
#include "scintilla/src/PositionCache.h"
#include "scintilla/src/EditModel.h"
#include "scintilla/src/MarginView.h"
#include "scintilla/src/EditView.h"
#include "scintilla/src/Editor.h"

#include "tinyxml2/tinyxml2.h"

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

bool htmlToColour(ColourDesired& colour, const char* html)
{
#if 1 // Built In
    colour.Set(html);
    colour.Set(colour.AsLong() | ((unsigned int)0xFF << 24)); // ColourDesired is lame in that it never sets the alpha channel..
    return true;
#else
    const char* start = html;
    if (*start == '#')
        ++start;

    const size_t size = strlen(start);
    if (size == 6)
    {
        // 8 bits per channel
{'fraction_non_alphanumeric': 0.20835565077664703, 'fraction_numerical': 0.005356186395286556, 'mean_word_length': 3.505428226779252, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4601932', 'n_tokens_mistral': 1363, 'n_tokens_neox': 1342, 'n_words': 245}