<commit_before>set nocompatible
let &rtp = '../../..,' . &rtp
filetype plugin on

set nomore

nnoremap q :qall!<cr>

let g:vimtex_toc_custom_matchers = [
      \ { 'title' : 'My Custom Environment',
      \   're' : '\v^\s*\\begin\{quote\}' }
      \]

silent edit main.tex

if empty($INMAKE) | finish | endif

let s:toc = vimtex#toc#get_entries()
call vimtex#test#assert_equal(len(s:toc), 19)

" let s:i = 0
" for s:x in s:toc
"   echo s:i '--' s:x.title "\n"
"   let s:i += 1
" endfor

call vimtex#test#assert_equal('chapters/sections/first.tex', s:toc[5].file)
call vimtex#test#assert_equal('chapters/sections/second.tex', s:toc[8].file)
call vimtex#test#assert_equal(
      \ 'eq:1                        (4.1 [p. 9])',
      \ s:toc[16].title)

quit!<commit_msg>fix: minor regression bug<commit_after>set nocompatible
let &rtp = '../../..,' . &rtp
filetype plugin on

set nomore

nnoremap q :qall!<cr>

let g:vimtex_toc_custom_matchers = [
      \ { 'title' : 'My Custom Environment',
      \   're' : '\v^\s*\\begin\{quote\}' }
      \]

silent edit main.tex

if empty($INMAKE) | finish | endif

let s:toc = vimtex#toc#get_entries()
call vimtex#test#assert_equal(len(s:toc), 19)

" let s:i = 0
" for s:x in s:toc
"   echo s:i '--' s:x.title "\n"
"   let s:i += 1
" endfor

call vimtex#test#assert_equal('chapters/sections/first.tex', s:toc[5].file)
call vimtex#test#assert_equal('chapters/sections/second.tex', s:toc[8].file)
call vimtex#test#assert_equal(
      \ 'eq:1                        (4.1 [p. 9])',
      \ s:toc[17].title)

quit!
{'fraction_non_alphanumeric': 0.18564036222509703, 'fraction_numerical': 0.015523932729624839, 'mean_word_length': 3.0077720207253886, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2475505', 'n_tokens_mistral': 668, 'n_tokens_neox': 626, 'n_words': 128}