support for space in file name + percent in width/height #1605

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
1 participant

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]] %}

ironbishop added some commits Jul 17, 2014

support for space in file name
This regular expression enable spaces in file names.

See test [before](http://rubular.com/r/DXcgehTAEV) and [after](http://rubular.com/r/INFxSJKXTe).
support for percent in dimensions
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 from support for space in file name to 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