We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0484e86 commit 21f4daaCopy full SHA for 21f4daa
_plugins/auto-anchor.rb
@@ -8,8 +8,9 @@
8
# - [Summary](URL): Details
9
10
Jekyll::Hooks.register :documents, :pre_render do |post|
11
- ## Don't process documents if YAML headers say: "auto_id: false"
12
- if post.data["auto_id"] != false
+ ## Don't process documents if YAML headers say: "auto_id: false" or
+ ## we're formatting for email
13
+ unless post.data["auto_id"] == false || ENV['JEKYLL_ENV'] == 'email'
14
post.content.gsub!(/^ *- .*/) do |string|
15
## Find shortest match for **bold**, *italics*, or [markdown][links]
16
title = string.match(/\*\*.*?\*\*|\*.*?\*|\[.*?\][(\[]/).to_s
0 commit comments