1import { Controller } from '@hotwired/stimulus' 2 3const highlightBarOffset = 8 4 5export default class extends Controller { 6 connect() { 7 // set highlight width to scrollable content width 8 const contentWidth = `${this.element.scrollWidth - highlightBarOffset}px` 9 for (const highlight of this.element.querySelectorAll('.code-highlight')) { 10 highlight.style.width = contentWidth 11 } 12 } 13}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.