Closed tsuyoshicho closed 4 years ago
let old_end = end_pattern
let end_pattern = s:replace_submatch_pattern(end_pattern, match_list)
let new_end = end_pattern
echom 'end pattern replace(old,new,match list)' old_end new_end match_list
を仕込んだ結果
end pattern replace(old,new,match list) \1 \1\V'''\m ['hook_post_source = ''''''', '''''''', '', '', '', '', '', '', '', '']
となりました
https://github.com/Shougo/context_filetype.vim/pull/44#issue-409122633
This patch breaks "end" patterns utilizing a backref to a Vim pattern embedded within the referenced "start" submatch. I see this behavior as pretty unexpected (and not that portable), so these sub-matches will now be matched literally.
もしかして、この話?
reproduced for me. I will revert it later.
I will fix it later instead.
It is reproduce-able only both css and toml... It is not easy to find.
Sorry, this looks like a bug in #44's processing. That immediate match should be
'\V```\m'
instead. I unfortunately can't submit a fix for this myself for the next few days, but it's an edge case with I'm guessing l:backref_end_prev
& l:backref_start
's initial values.
Found the problem and commented it over on #44. -1 upper bound on range where there should be 0, leading the whole string's insertion.
Yes. I have fixed the error.
44 マージ後に追加設定なしで、以下の操作がエラーします
手順
ログ
(preciousのエラーも出ますが、参考までに付けています)
確認
以下のデバッグコードを入れ
再現させると
となりました。
searchposへ
\1
を含んだパターンが入ったためのようです。備考
マージ前のcontext_filetypeが残っている環境での動作に問題ないことは確認しました。