diff --git a/contributing/CONTRIBUTING.lua b/contributing/CONTRIBUTING.lua
index 215cff10c4ce3d10679ebc4ab8bea5f5d22efdd4..79e372437b87a8a80613a5a64cbcf2414800071d 100644
--- a/contributing/CONTRIBUTING.lua
+++ b/contributing/CONTRIBUTING.lua
@@ -8,9 +8,8 @@
 -- tool. This is needed when converting a set of reST documents to a markdown
 -- one where directives like `toctree` and `contents` are not supported and end
 -- up translated literally.
-function Div(el)
-  local class = el["c"][1][2][1]
-  if class == "toctree" or class == "contents" then
+function Div(div)
+  if div.classes:includes('toctree') or div.classes:includes('contents') then
     return {}
   else
     return nil