method
peek_probably_header?
v7.2.3 -
Show latest stable
- Class:
RailInspector::Changelog::Parser
peek_probably_header?()private
No documentation available.
# File tools/rail_inspector/lib/rail_inspector/changelog.rb, line 168
def peek_probably_header?
return false unless @buffer.peek(1) == "*"
maybe_header = @buffer.check_until(/\n/).strip
# If there are an odd number of *, then the line is almost certainly a
# header since bolding requires pairs.
return true unless maybe_header.count("*").even?
!maybe_header.end_with?("*")
end