Skip to content

Commit

Permalink
fix: script
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Jan 26, 2025
1 parent 3e138aa commit fecb96c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/misc/update_functions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def process_headlines(line)

def fix_links(line)
## Fix link: #a_b_c -> #a-b-c
line.gsub!(/(#[a-zA-Z0-9_]+)\)/) { |match| match.gsub("_", "-") }
# line.gsub!(/(#[a-zA-Z0-9_]+)\)/) { |match| match.gsub("_", "-") }
## Fix link: a_b_c.md -> #a-b-c
line.gsub!(/\]\(([a-zA-Z0-9_]+\.md)\)/) { |match|
match.gsub("_", "-").gsub(".md", "").gsub("](", "](#")
Expand Down Expand Up @@ -69,7 +69,7 @@ def fix_links(line)

lines.map! do |line|
line = process_headlines(line)
# line = fix_links(line)
line = fix_links(line)
line
end

Expand Down

0 comments on commit fecb96c

Please sign in to comment.