You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\section{テスト}
\begin{table}
\caption{テスト}
\label{tbl:2_phone}
\begin{tabular}{|c||c|c|c|c|c|} \hline
& a & i & u & e & o \\\hline\hline
\end{tabular}
\end{table}
実行 (pandoc 2.11.4)
$ pandoc -t lua/review.lua --lua-filter lua/filters.lua genko/test.tex
Error running filter lua/filters.lua:
lua/filters.lua:105: attempt to get length of a nil value (field 'content')
stack traceback:
filters.lua:105: in function <lua/filters.lua:100>
コード
local function caption_div(div)
local class = div.classes[1]
local caption = div.attributes.caption
if ((#div.content == 1) and
(#div.content[1].content == 1) and ←ここでcontent[1].contentを取ろうとして失敗する
(div.content[1].content[1].tag == "Math") and
(div.identifier)) then
ソース
実行 (pandoc 2.11.4)
コード
div.content[1].content
を呼ぶことがダメなので、div.content[1].content ~= nil
判定だとダメだった。「.content」フィールドの存在有無を確認するにはどうしたらよいのだろう?The text was updated successfully, but these errors were encountered: