Skip to content

Expose a function that returns the lines of code #37

Closed
@MurhafSousli

Description

@MurhafSousli

Hi, nice plugin!

I have a highlightjs module for Angular and I wanted to integrate your plugin in it, but the problem is that your plugin modifies the DOM directly, which causes the "auto-highlight" feature to stuck in an infinite loop

I use MutationObserver to highlight text content

 /** Highlight when text content changes */
 this.domObs = new MutationObserver(() => this.highlightTextContent());
 this.domObs.observe(this.el, { childList: true, subtree: true });

I was wondering if you can expose a function that returns the lines of code, if not possible, can you guide me on how do you count the lines of codes (I could not get how it works in the source code)

Many thanks,

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions