mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-29 03:32:43 -05:00
Remove unused doc directory
This commit is contained in:
parent
308aa42b67
commit
9c45206c28
2 changed files with 0 additions and 37 deletions
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Render Markdown ToC with only headings appearing after "Table of Contents"
|
|
||||||
dir="$(dirname "$0")"
|
|
||||||
"$dir"/mdtoc "$1" | sed -n '/table-of-contents/,$p' | grep -v table-of-contents
|
|
33
doc/mdtoc
33
doc/mdtoc
|
@ -1,33 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
require 'escape_utils'
|
|
||||||
|
|
||||||
start_at_level = 2
|
|
||||||
|
|
||||||
headers = Hash.new(0)
|
|
||||||
|
|
||||||
anchor = lambda { |title|
|
|
||||||
href = title.downcase
|
|
||||||
href.gsub!(/[^\w\- ]/, '') # remove punctuation
|
|
||||||
href.gsub!(' ', '-') # replace spaces with dash
|
|
||||||
href = EscapeUtils.escape_uri(href) # escape extended UTF-8 chars
|
|
||||||
|
|
||||||
uniq = (headers[href] > 0) ? "-#{headers[href]}" : ''
|
|
||||||
headers[href] += 1
|
|
||||||
|
|
||||||
href + uniq
|
|
||||||
}
|
|
||||||
|
|
||||||
ARGF.each_line do |line|
|
|
||||||
if line =~ /^(#+) (.+?)#*$/
|
|
||||||
level = $1.size
|
|
||||||
next if level < start_at_level
|
|
||||||
title = $2.strip
|
|
||||||
href = anchor.call title
|
|
||||||
|
|
||||||
puts "%s* [%s](#%s)" % [
|
|
||||||
' ' * (level - start_at_level),
|
|
||||||
title,
|
|
||||||
href
|
|
||||||
]
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in a new issue