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
It's a feature request to provide opportunity to get the line number of element that is being filtered with Lua filters. It would be useful to have sourceLineNumber field in each element inside pandoc's AST as if you want to throw an error while applying filter, it's hard to guess where is the block which caused an error. Of course, It can be done by assigning id to every block that you write:
functionCodeBlock(block)
ifblock.attributes['filterAttr'] ~='supported' thenerror('An error while processing block'.. ((block.identifier~='' and (' #' ..block.identifier)) or'')
..': unsupported \'filterAttr\' value \'' ..block.attributes['filterAttr'] ..'\'')
end-- something here with filterAttrend
That would give an error:
An error while processing block #errorBlock: unsupported 'filterAttr' value 'unsupported'
But what if end user do not want to give each block an id?
Moreover, it would be even better if i can leave it to pandoc and just throw an error:
functionCodeBlock(block)
ifblock.attributes['filterAttr'] ~='supported' thenerror('unsupported \'filterAttr\' value \'' ..block.attributes['filterAttr'] ..'\'')
end-- something here with filterAttrend
And pandoc would handle errors and write id of element and line number when element starts:
An error while processing CodeBlock #errorBlock on line 1: unsupported 'filterAttr' value 'unsupported'
Or if id is empty:
An error while processing CodeBlock on line 1: unsupported 'filterAttr' value 'unsupported'
The text was updated successfully, but these errors were encountered:
It's a feature request to provide opportunity to get the line number of element that is being filtered with Lua filters. It would be useful to have
sourceLineNumber
field in each element inside pandoc's AST as if you want to throw an error while applying filter, it's hard to guess where is the block which caused an error. Of course, It can be done by assigning id to every block that you write:And in the filter:
That would give an error:
But what if end user do not want to give each block an id?
Moreover, it would be even better if i can leave it to pandoc and just throw an error:
And pandoc would handle errors and write id of element and line number when element starts:
Or if id is empty:
The text was updated successfully, but these errors were encountered: