Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

None yet

1 participant