Skip to content

Conversation

@ironbishop
Copy link

This code provides:

  • (multiple) space(s) in file name
  • percent dimensions (html5 compliant)

See regular expression tests before and after.

From this:
{% img [class names] /path/to/image [width] [height] [title text [alt text]] %}
To this:
{% img [class names] /path/to/image[ file].ext [width[%]] [height[%]] [title text [alt text]] %}

This regular expression enable spaces in file names.

See test [before](http://rubular.com/r/DXcgehTAEV) and [after](http://rubular.com/r/INFxSJKXTe).
New regexp, [tested](http://rubular.com/r/326X87G40B), adding % for width/height.

Using style property, since in HTML5 the <img> width/height must be in pixels.
@ironbishop ironbishop changed the title support for space in file name support for space in file name + percent in width/height Jul 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant