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