Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Lexer.Html does not support code folding #533

Open
louisoft88 opened this issue Apr 20, 2023 · 0 comments
Open

Lexer.Html does not support code folding #533

louisoft88 opened this issue Apr 20, 2023 · 0 comments

Comments

@louisoft88
Copy link

Hello,

If I use Html lexer the code folding disapppers. Cpp or Xml lexers do support code folding. Is this statement right or I am doing something wrong.

    /// <summary>
    /// Creates syntax coloring of HTML language
    /// </summary>
    public void CreateHtmlLanguage()
    {
        this.CurrentLanguage = Lexer.Html;
        TextArea.Lexer = this.CurrentLanguage;

        TextArea.SetKeywords(0, HtmlKeyWords);

        TextArea.StyleResetDefault();
        TextArea.Styles[Style.Default].Font = this.FontName;
        TextArea.Styles[Style.Default].Size = this.FontSize;
        TextArea.StyleClearAll();

        TextArea.Styles[Style.Html.Default].ForeColor = Utils.IntToColor(0x000000);
        TextArea.Styles[Style.Html.Comment].ForeColor = Utils.IntToColor(0x008000);
        TextArea.Styles[Style.Html.Number].ForeColor = Utils.IntToColor(0xFF0000);
        TextArea.Styles[Style.Html.DoubleString].ForeColor = Utils.IntToColor(0x8000FF);
        TextArea.Styles[Style.Html.SingleString].ForeColor = Utils.IntToColor(0x8000FF);
        TextArea.Styles[Style.Html.Tag].ForeColor = Utils.IntToColor(0x0000FF);
        TextArea.Styles[Style.Html.TagEnd].ForeColor = Utils.IntToColor(0x0000FF);
        TextArea.Styles[Style.Html.TagUnknown].ForeColor = Utils.IntToColor(0x000000);
        TextArea.Styles[Style.Html.Attribute].ForeColor = Utils.IntToColor(0xFF0000);
        TextArea.Styles[Style.Html.AttributeUnknown].ForeColor = Utils.IntToColor(0x000000);
        TextArea.Styles[Style.Html.CData].ForeColor = Utils.IntToColor(0xFF8000);
        TextArea.Styles[Style.Html.Value].ForeColor = Utils.IntToColor(0xFF8000);
        TextArea.Styles[Style.Html.Entity].ForeColor = Utils.IntToColor(0x000000);
    }

Thanks for any help.
Louis

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant