Skip to content

Commit

Permalink
Fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Alwinator committed Dec 16, 2021
1 parent cb68776 commit 0d791fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
*.gem
*.pdf
*.pdf
*.html
4 changes: 3 additions & 1 deletion lib/asciidoctor-lists/extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def process(document)
document.find_by(context: eval(element_name)).each do |element|

if element.caption
element.id = SecureRandom.uuid
unless element.id
element.id = SecureRandom.uuid
end
references_asciidoc << %(xref:#{element.id}[#{element.caption}]#{element.title} +)
end
end
Expand Down

0 comments on commit 0d791fb

Please sign in to comment.