jlong / radius

A small, but powerful tag-based template language for Ruby modeled after the ones used in MovableType and TextPattern. It has tags similar to XML, but can be used to generate any form of plain text (HTML, e-mail, etc...).
MIT License
101 stars 21 forks source link

Non-prefixed Tags #1

Open trans opened 15 years ago

trans commented 15 years ago

I'd like to request a feature. I'd like to be able to use Radius tags without having to set a prefix. Eg.

  parser = Radius::Parser.new(context, :tag_prefix => nil)
  puts parser.parse(%{A small example:\n<repeat times="3">* <hello />!\n</repeat>})

Is that feasible?

austinthecoder commented 14 years ago

Probably not a good idea since the namespace would clash with html tags

jlong commented 14 years ago

I'm not opposed to this. See if you can get it worked out and send a pull request.

andybrice commented 10 years ago

It would be interesting to add support for non-prefixed tags containing hyphens. That way they would not clash with the HTML namespace, and Radius could be used as a preprocessor for custom HTML tags of the type proposed in the upcoming Web Components spec.

I would definitely have a use for this. And coding it might be beyond my knowledge, but I'll have a go.