+# frozen_string_literal: true
+
module RichText
SPAMMY_PHRASES = [
"Business Description:", "Additional Keywords:"
end
def truncated_text_content(element)
- text = String.new
+ text = +""
append_text = lambda do |child|
if child.type == :text
+# frozen_string_literal: true
+
##
# Encodes and decodes locations from Morton-coded "quad tile" strings. Each
# variable-length string encodes to a precision of one pixel per tile (roughly,
def encode(lon, lat, z)
code = interleave_bits(((lon + 180.0) * (2**32) / 360.0).to_i,
((lat + 90.0) * (2**32) / 180.0).to_i)
- str = String.new
+ str = +""
# add eight to the zoom level, which approximates an accuracy of
# one pixel in a tile.
((z + 8) / 3.0).ceil.times do |i|