@speed-highlight/core
    Preparing search index...

    Function highlightText

    • Function

      Highlight a string passed as argument and return it

      Parameters

      • src: string

        The code

      • lang: ShjLanguage

        The language of the code

      • Optionalmultiline: boolean = true

        If it is multiline, it will add a wrapper for the line numbering and header

      • Optionalopt: ShjOptions = {}

        Customization options

      Returns Promise<string>

      The highlighted string

      elm.innerHTML = await highlightText(code, 'js');
      

      highlightText