This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require 'rexml/document' | |
include REXML | |
doc = Document.new(ARGF) | |
doc.context[:attribute_quote] = :quote | |
# 親spanを追加するには%w()内に空白区切りで指定 | |
%w(bold).each do |style| | |
doc.each_element("//span[@class='#{style}']") do |e| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
# Lazy AutoLayout CSS Checker | |
# Copyright 2016 Kenshi Muto | |
# MIT License | |
lno = 0 | |
ARGF.each do |l| | |
lno += 1 | |
l.chomp! | |
if l =~ /-@-[^\s]+/ |
NewerOlder