Skip to content

Commit

Permalink
make_spec.lua - use unsafe mode so HTML isn't filtered out.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Apr 8, 2019
1 parent e3317c5 commit 586b010
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/make_spec.lua
Expand Up @@ -31,7 +31,7 @@ local extract_references = function(doc)
((node_type == cmark.NODE_LINK and cmark.node_get_url(cur) == '@') or
node_type == cmark.NODE_HEADING) then
local child = cmark.node_first_child(cur)
local label = trim(cmark.render_commonmark(child, OPT_DEFAULT, 0))
local label = trim(cmark.render_commonmark(child, OPT_DEFAULT + OPT_UNSAFE, 0))
local ident = to_identifier(label)
if refs[label] then
warn("duplicate reference " .. label)
Expand Down Expand Up @@ -119,7 +119,7 @@ local create_anchors = function(doc, meta, to)

local anchor
local child = cmark.node_first_child(cur)
local label = trim(cmark.render_commonmark(child, OPT_DEFAULT, 0))
local label = trim(cmark.render_commonmark(child, OPT_DEFAULT + OPT_UNSAFE, 0))
local ident = to_identifier(label)
if node_type == cmark.NODE_LINK then
if format == 'latex' then
Expand Down

0 comments on commit 586b010

Please sign in to comment.