This represents a list of attributes specified in the Markdown document that apply to a Markdown-generated tag. What was `{#id .class key=“val” ref}` in the Markdown is parsed into `[[:id, 'id'], [:class, 'class'], ['key', 'val'], [:ref, 'ref']]`.
# File lib/maruku/attributes.rb, line 7 def to_s map do |k, v| value = quote_if_needed(v) case k when :id; "#" + value when :class; "." + value when :ref; value else quote_if_needed(k) + "=" + value end end.join(' ') end
# File lib/maruku/attributes.rb, line 22 def quote_if_needed(str) (str =~ /[\s'"]/) ? str.inspect : str end