; Headings
(section
  .
  (atx_heading (atx_h1_marker)) @start
  (#set! role heading)
  (#set! scope.level 1)
  (#set! scope.byLine)
) @end.after

(section
  .
  (setext_heading (setext_h1_underline)) @start
  (#set! role heading)
  (#set! scope.level 1)
  (#set! scope.byLine)
) @end.after

(section
  .
  (atx_heading (atx_h2_marker)) @start
  (#set! role heading)
  (#set! scope.level 2)
  (#set! scope.byLine)
) @end.after

(section
  .
  (setext_heading (setext_h2_underline)) @start
  (#set! role heading)
  (#set! scope.level 2)
  (#set! scope.byLine)
) @end.after

(section
  .
  (atx_heading (atx_h3_marker)) @start
  (#set! role heading)
  (#set! scope.level 3)
  (#set! scope.byLine)
) @end.after

(section
  .
  (atx_heading (atx_h4_marker)) @start
  (#set! role heading)
  (#set! scope.level 4)
  (#set! scope.byLine)
) @end.after

(section
  .
  (atx_heading (atx_h5_marker)) @start
  (#set! role heading)
  (#set! scope.level 5)
  (#set! scope.byLine)
) @end.after

(section
  .
  (atx_heading (atx_h6_marker)) @start
  (#set! role heading)
  (#set! scope.level 6)
  (#set! scope.byLine)
) @end.after
