mirror of
https://github.com/ToshioCP/Gtk4-tutorial.git
synced 2024-11-16 19:50:35 +01:00
7 lines
245 B
Ruby
7 lines
245 B
Ruby
require_relative 'lib/lib_src2md.rb'
|
|
|
|
src = File.read ARGV[0]
|
|
buf = src.partitions(/^@@@table\n.*?@@@\n/m)
|
|
dst = buf.map{|chunk| chunk=~/\A@@@table/ ? at_table(chunk) : chunk}.join
|
|
File.write ARGV[0]+".bak", src # backup
|
|
File.write ARGV[0], dst
|