<commit_before>" vimtex - LaTeX plugin for Vim
"
" Maintainer: <NAME>
" Email:      <EMAIL>
"

function! vimtex#fold#markers#new(config) abort " {{{1
  return extend(deepcopy(s:folder), a:config)
endfunction

" }}}1


let s:folder = {
      \ 'name' : 'markers',
      \ 're' : {
      \   'start' : '\v\%.*\{\{\{',
      \   'end' : '\v\%\s*\}\}\}',
      \   'text' : [
      \     ['\v\%\s*\{\{\{\s*\zs.*', '% {{{ '],
      \     ['\v\%\s*\zs.*\ze\{\{\{', '% {{{ '],
      \     ['\v^.*\ze\s*\%', ''],
      \   ]
      \ },
      \ 'opened' : 0,
      \}
function! s:folder.level(line, lnum) abort dict " {{{1
  if a:line =~# self.re.start
    let s:self.opened = 1
    return 'a1'
  elseif a:line =~# self.re.end
    let s:self.opened = 0
    return 's1'
  endif
endfunction

" }}}1
function! s:folder.text(line, level) abort dict " {{{1
  for [l:re, l:pre] in self.re.text
    let l:text = matchstr(a:line, l:re)
    if !empty(l:text) | return l:pre . l:text | endif
  endfor

  return '% {{{ ' . getline(v:foldstart + 1)<commit_msg>minor tweak to ignore trailing numbers (#1439)<commit_after>" vimtex - LaTeX plugin for Vim
"
" Maintainer: <NAME>
" Email:      <EMAIL>
"

function! vimtex#fold#markers#new(config) abort " {{{1
  return extend(deepcopy(s:folder), a:config)
endfunction

" }}}1


let s:folder = {
      \ 'name' : 'markers',
      \ 're' : {
      \   'start' : '\v\%.*\{\{\{',
      \   'end' : '\v\%\s*\}\}\}',
      \   'text' : [
      \     ['\v\%\s*\{\{\{\d?\s*\zs.*', '% {{{ '],
      \     ['\v\%\s*\zs.*\ze\{\{\{', '% {{{ '],
      \     ['\v^.*\ze\s*\%', ''],
      \   ]
      \ },
      \ 'opened' : 0,
      \}
function! s:folder.level(line, lnum) abort dict " {{{1
  if a:line =~# self.re.start
    let s:self.opened = 1
    return 'a1'
  elseif a:line =~# self.re.end
    let s:self.opened = 0
    return 's1'
  endif
endfunction

" }}}1
function! s:folder.text(line, level) abort dict " {{{1
  for [l:re, l:pre] in self.re.text
    let l:text = matchstr(a:line, l:re)
    if !empty(l:text) | return l:pre . l:text | endif
  endfor

  return '% {{{ ' . getline(v:foldstart + 1)
{'fraction_non_alphanumeric': 0.24739829706717123, 'fraction_numerical': 0.01229895931882687, 'mean_word_length': 2.0921052631578947, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7198601', 'n_tokens_mistral': 914, 'n_tokens_neox': 890, 'n_words': 173}