His may be two issues, the first and main Kramdown TOC-specific. The second one came up when I was trying to workaround the first issue, and it may be Jekyll/Markdown rather than Kramdown-specific.
This may be rare, but it comes from a real world usage: http://selite.github.io/EnhancedSelenese. The problem shows up when running Jekyll locally and also on GitHub pages.
The file itself:
---
title: Test
layout: default
---
* TOC
{:toc}
# Special header with a backslash \\ and a back apostrophe right \` after it: \\\`
That combination of \\ and \` right after it in the header shows up OK in the content, but not in TOC.
# Using an empty span works for the visual but it messes up ID \\<span></span>`
The ID of this header (as listed by TOC) has 'spanspan' for that `<span></span>`, i.e. #using-an-empty-span-works-for-the-visual-but-it-messes-up-id-spanspan.
This is a problem with how String.sub works and I have filed a bug report for Ruby (see https://bugs.ruby-lang.org/issues/11132) - if this is a bug in Ruby it will be fixed.
However, I have implemented a work-around which will be in the next release.
His may be two issues, the first and main Kramdown TOC-specific. The second one came up when I was trying to workaround the first issue, and it may be Jekyll/Markdown rather than Kramdown-specific.
This may be rare, but it comes from a real world usage: http://selite.github.io/EnhancedSelenese. The problem shows up when running Jekyll locally and also on GitHub pages.
The file itself:
_layouts/default.md:
Gemfile:
source 'https://rubygems.org'
gem 'github-pages'
gem 'jekyll-sitemap'
_config.yml:
ruby 2.0.0p353
gem list --local
activesupport (4.2.1)
bigdecimal (1.2.7, 1.2.0)
blankslate (3.1.3, 2.1.2.4)
bundler (1.9.6, 1.9.4, 1.9.2)
celluloid (0.16.0)
classifier-reborn (2.0.3)
coffee-script (2.4.1)
coffee-script-source (1.9.1.1, 1.9.1)
colorator (0.1)
daemons (1.2.2, 1.1.9)
eventmachine (1.0.7, 1.0.3)
execjs (2.5.2, 2.5.0)
fast-stemmer (1.0.2)
ffi (1.9.8)
gemoji (2.1.0)
github-pages (34, 33)
github-pages-health-check (0.3.0, 0.2.2)
hitimes (1.2.2)
html-pipeline (1.11.0, 1.9.0)
i18n (0.7.0)
io-console (0.4.2)
jekyll (2.5.3, 2.4.0)
jekyll-coffeescript (1.0.1)
jekyll-gist (1.2.1)
jekyll-mentions (0.2.1)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.7.0, 0.6.2)
jekyll-sass-converter (1.3.0, 1.2.0)
jekyll-sitemap (0.8.1, 0.6.3)
jekyll-watch (1.2.1)
jemoji (0.4.0)
json (1.8.2, 1.7.7)
json_pure (1.8.2)
kramdown (1.7.0, 1.6.0, 1.5.0)
libv8 (3.16.14.7 x86_64-linux)
liquid (3.0.2, 3.0.1, 2.6.1)
listen (2.10.0)
maruku (0.7.2, 0.7.0)
mercenary (0.3.5)
mini_portile (0.6.2)
minitest (5.6.1, 5.5.1)
net-dns (0.8.0)
nokogiri (1.6.6.2)
parslet (1.7.0, 1.5.0)
posix-spawn (0.3.11)
psych (2.0.13, 2.0.0)
public_suffix (1.5.1, 1.5.0)
pygments.rb (0.6.3, 0.6.1)
rack (1.6.0, 1.5.2)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
rdiscount (2.1.8, 2.1.7)
rdoc (4.2.0, 4.0.1)
redcarpet (3.2.3, 3.1.2)
RedCloth (4.2.9)
ref (1.0.5)
rubygems-update (2.4.6)
safe_yaml (1.0.4)
sass (3.4.13)
terminal-table (1.4.5)
therubyracer (0.12.2)
thin (1.6.3, 1.5.0)
thread_safe (0.3.5)
timers (4.0.1)
toml (0.1.2)
tzinfo (1.2.2)
yajl-ruby (1.2.1)
The text was updated successfully, but these errors were encountered: