Skip to main content

inject_anchors

Function inject_anchors 

Source
pub(crate) fn inject_anchors(html: &str, lines: &[usize]) -> String
Expand description

Insert data-afm-source-line="N" into the first opening tag at each top-level block boundary. Tags considered top-level are <p>, <h1..h6>, <ul>, <ol>, <blockquote>, <pre>, <table>, <hr>, <div> (containers).