Add a new function lineNumbersValue to take in a string of html, usually it's the returned value of hljs.highlight(), and add line number to the markup.
Also change the function run synchronously compared to lineNumbersBlock because setTimeout makes it difficult to use the returned value.
Add a new function
lineNumbersValue
to take in a string of html, usually it's the returned value ofhljs.highlight()
, and add line number to the markup.Also change the function run synchronously compared to
lineNumbersBlock
becausesetTimeout
makes it difficult to use the returned value.