pub fn highlight<'a, It>(events: It) -> Result<Vec<Event<'a>>, Error>Expand description
Apply syntax highlighting to pulldown-cmark events using the default theme.
Take an iterator over pulldown-cmark’s events, and (on success) return a new iterator where code blocks have been turned into HTML text blocks with syntax highlighting.
It might be time-consuming to call this method in a hot loop: in that situation you might want to use a PulldownHighlighter object instead.