forked from senny/sablon
-
Notifications
You must be signed in to change notification settings - Fork 2
Image support enhancements #5
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
Open
buitranquyet
wants to merge
13
commits into
fullfabric:image-support-enhancements
Choose a base branch
from
buitranquyet:image-support-enhancements
base: image-support-enhancements
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Image support enhancements #5
buitranquyet
wants to merge
13
commits into
fullfabric:image-support-enhancements
from
buitranquyet:image-support-enhancements
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Pass node diretly into Paragraph.new * Pass definition directly into ListParagraph.new * Change argument order for Paragraph.new and ListParagraph.new * Refactor some of the logic in ast_next_paragraph into a prepare_node fucntion This function wil later on ensure all nodes have a stype attribute even if it is an empty string to avoid nil's popping up. * Use node['class'] instead of directly passing the Paragraph style in * Change node['class'] to node['pStyle'] This will work better once I get some of the attribute logic working. * Implement simple parsing of attributes * Implement parsing of nested attributes This also removes the special case of ListParagraph * Remove ListParagraph class * Refactor list testing methods to handle direct usage of pPr to store list props * Fix comment in ast.rb * Refactor pattern to_docx usage * Rename prepare_node to prepare_paragraph * Return properties from prepare_paragraph and pass onto Paragraph initialization * Remove passing of node into Parapgrah, only properities is needed * Rename Node.process_attributes into Node.process_properties It also uses the @properties isntance var instead of @attributes * Fix html converter test to use new instance var * Rewrite transform_attr to work on arrays with nested hashes This replaces the much more fragile RegExp logic in place before. * Change numPr property defintion to be a nested list of hashes This was done to match the new interface expected by transform_attr * Rubocop fix, curly bracket spacing * Update converter test to check nested property structure instead of using regexp * Fix syntax error leftover from rebase accidently killed off an `end` tag * Refactor Node.process_properties method * Slight change in default handling of node properties when value is a scalar * slight refactor of Pararaph.ppr_docx and Paragraph.to_docx * Move logic to handle properties from Node into a NodeProperties class * Minor refactor to better handle proper hashes that have keys with nil value * Implement unit tets fot NodeProperties class * Refactor to pass tagname in during instantiation so to_docx call signature is consistent * Split up node properties test method into smaller tests cases * Add paragraph factory method to node properties
…nger match the beginning of comment block. (senny#58)
* Pass node diretly into Paragraph.new * Pass definition directly into ListParagraph.new * Change argument order for Paragraph.new and ListParagraph.new * Refactor some of the logic in ast_next_paragraph into a prepare_node fucntion This function wil later on ensure all nodes have a stype attribute even if it is an empty string to avoid nil's popping up. * Use node['class'] instead of directly passing the Paragraph style in * Change node['class'] to node['pStyle'] This will work better once I get some of the attribute logic working. * Implement simple parsing of attributes * Implement parsing of nested attributes This also removes the special case of ListParagraph * Remove ListParagraph class * Refactor list testing methods to handle direct usage of pPr to store list props * Fix comment in ast.rb * Refactor pattern to_docx usage * Rename prepare_node to prepare_paragraph * Return properties from prepare_paragraph and pass onto Paragraph initialization * Remove passing of node into Parapgrah, only properities is needed * Rename Node.process_attributes into Node.process_properties It also uses the @properties isntance var instead of @attributes * Fix html converter test to use new instance var * Rewrite transform_attr to work on arrays with nested hashes This replaces the much more fragile RegExp logic in place before. * Change numPr property defintion to be a nested list of hashes This was done to match the new interface expected by transform_attr * Rubocop fix, curly bracket spacing * Update converter test to check nested property structure instead of using regexp * Fix syntax error leftover from rebase accidently killed off an `end` tag * Refactor Node.process_properties method * Slight change in default handling of node properties when value is a scalar * slight refactor of Pararaph.ppr_docx and Paragraph.to_docx * Squashed merge of support-style-attribute to add in changes without rebasing. Rebasing the support-style-attribute branch against the changes to support-arbitrary-node-attributes isn't practical due to it being rebased against 'master'. Merging instead is the cleaner option. The commits were squashed to prevent an odd history being generated since this is a branch of the support-arbitrary-node-attributes branch. Squashed commit of the following: commit d11797e Author: Matthew Stadelman <[email protected]> Date: Mon May 15 10:34:28 2017 -0400 Add method to pass parent attributes onto children, only used for lists currently commit d5be869 Author: Matthew Stadelman <[email protected]> Date: Fri May 12 11:15:12 2017 -0400 Fix error in coverting CSS -> XML when processing a property hash of attributes The ending / was being omitted from the property tag commit 8a308fc Author: Matthew Stadelman <[email protected]> Date: Fri May 12 10:28:53 2017 -0400 Change background-color to map to shd instead of highlight commit f19ee32 Author: Matthew Stadelman <[email protected]> Date: Fri May 12 08:37:06 2017 -0400 Add support for text-decoration style Only underline and line-through are supported commit 78e13cd Author: Matthew Stadelman <[email protected]> Date: Fri May 12 08:32:06 2017 -0400 Implement support for a hash of values to directly set XML node attributes in styles commit e8225b0 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 15:04:10 2017 -0400 Remove empty equals signs when value is nil commit e6f6ac7 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 14:55:29 2017 -0400 Add a separate class for testing each style. I haven't added all of the tests yet, I'll see how senny feels about storing this all in config and if so, what do we want in our default setup. Although I feel like full support of common styles should ship default with sablon to ease burden on the users commit 4d0800a Author: Matthew Stadelman <[email protected]> Date: Thu May 11 14:45:00 2017 -0400 Fix test now that parapgraph props are being whitelisted commit af110f0 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 14:42:32 2017 -0400 Improve logic to whitelist properties passed in commit 8d6ef9c Author: Matthew Stadelman <[email protected]> Date: Thu May 11 12:33:25 2017 -0400 Remove require 'pry' commit 227058d Author: Matthew Stadelman <[email protected]> Date: Thu May 11 12:32:52 2017 -0400 Add explicit whitelisting of properties commit ee422ca Author: Matthew Stadelman <[email protected]> Date: Thu May 11 11:05:00 2017 -0400 Update converter_test to remove empty w:val tags commit 2544e19 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 11:04:27 2017 -0400 Change value check in transform_attr to check for nil instead of empty string commit 0351b8a Author: Matthew Stadelman <[email protected]> Date: Thu May 11 11:03:56 2017 -0400 Change element based styles from empty string to nil commit 3bb3d5a Author: Matthew Stadelman <[email protected]> Date: Thu May 11 10:33:21 2017 -0400 Implement tests for new code in converter_test.rb commit 0f416a6 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 10:32:17 2017 -0400 Minor refactors to remove invalid attributes for a run Currently filtered attributes are pStyle, numPr, jc commit ca4239e Author: Matthew Stadelman <[email protected]> Date: Thu May 11 10:07:34 2017 -0400 Change code in ast_runs to pass the text to Run instead of the Node commit af7c4cd Author: Matthew Stadelman <[email protected]> Date: Thu May 11 10:05:14 2017 -0400 Refactor Text class into Run class The new class properly handles turning run properties into a WordML string commit af8106f Author: Matthew Stadelman <[email protected]> Date: Thu May 11 10:00:37 2017 -0400 Remove TextFormat class This is suplanted by the use of Run properties which are leagues more flexible commit cba4ee8 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 10:00:02 2017 -0400 Slight refactor of Paragraph class commit e20804c Author: Matthew Stadelman <[email protected]> Date: Thu May 11 09:57:09 2017 -0400 Refactor ast_text method and rename it ast_runs commit a35e4dc Author: Matthew Stadelman <[email protected]> Date: Thu May 11 09:51:08 2017 -0400 Pass Paragraph properties directly onto the runs commit b3004a3 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 09:37:48 2017 -0400 Add prepare_run method to HTMLConverter commit 9f41139 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 09:23:48 2017 -0400 Add style processing to preapre_paragraph commit 2bd9ce7 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 09:14:21 2017 -0400 Add process_style method to HTMLConverter commit e738ac4 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 08:53:33 2017 -0400 Update converter test to check nested property structure instead of using regexp commit e22a4e7 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 08:48:19 2017 -0400 Rubocop fix, curly bracket spacing commit dec51d0 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 08:44:53 2017 -0400 Change numPr property defintion to be a nested list of hashes This was done to match the new interface expected by transform_attr commit aaf2859 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 08:43:45 2017 -0400 Rewrite transform_attr to work on arrays with nested hashes This replaces the much more fragile RegExp logic in place before. commit c90bb34 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 08:16:47 2017 -0400 Fix html converter test to use new instance var commit 3f8c84b Author: Matthew Stadelman <[email protected]> Date: Thu May 11 08:15:53 2017 -0400 Rename Node.process_attributes into Node.process_properties It also uses the @properties isntance var instead of @attributes commit 0be7781 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 08:11:34 2017 -0400 Remove passing of node into Parapgrah, only properities is needed commit b73a557 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 08:06:19 2017 -0400 Return properties from prepare_paragraph and pass onto Paragraph initialization commit 0319437 Author: Matthew Stadelman <[email protected]> Date: Thu May 11 08:02:24 2017 -0400 Rename prepare_node to prepare_paragraph commit 4cf0536 Author: Matthew Stadelman <[email protected]> Date: Mon May 8 06:51:45 2017 -0400 Refactor pattern to_docx usage commit dd3da5d Author: Matthew Stadelman <[email protected]> Date: Mon May 8 06:48:36 2017 -0400 Fix comment in ast.rb commit 0917c7c Author: Matthew Stadelman <[email protected]> Date: Mon May 8 06:42:28 2017 -0400 Refactor list testing methods to handle direct usage of pPr to store list props commit 087dcf1 Author: Matthew Stadelman <[email protected]> Date: Thu May 4 17:49:07 2017 -0400 Remove ListParagraph class commit cadf3f7 Author: Matthew Stadelman <[email protected]> Date: Thu May 4 17:43:44 2017 -0400 Implement parsing of nested attributes This also removes the special case of ListParagraph commit 5c5c489 Author: Matthew Stadelman <[email protected]> Date: Thu May 4 17:03:31 2017 -0400 Implement simple parsing of attributes commit 0830ed3 Author: Matthew Stadelman <[email protected]> Date: Thu May 4 16:37:23 2017 -0400 Change node['class'] to node['pStyle'] This will work better once I get some of the attribute logic working. commit 286b2c9 Author: Matthew Stadelman <[email protected]> Date: Thu May 4 16:13:36 2017 -0400 Use node['class'] instead of directly passing the Paragraph style in commit 30385c2 Author: Matthew Stadelman <[email protected]> Date: Thu May 4 15:59:13 2017 -0400 Refactor some of the logic in ast_next_paragraph into a prepare_node fucntion This function wil later on ensure all nodes have a stype attribute even if it is an empty string to avoid nil's popping up. commit 099898f Author: Matthew Stadelman <[email protected]> Date: Thu May 4 14:59:39 2017 -0400 Add blankline after private to satisfy rubocop commit 494349f Author: Matthew Stadelman <[email protected]> Date: Thu May 4 14:56:22 2017 -0400 Change argument order for Paragraph.new and ListParagraph.new commit efc6f8b Author: Matthew Stadelman <[email protected]> Date: Thu May 4 14:54:27 2017 -0400 Pass definition directly into ListParagraph.new commit 963d96d Author: Matthew Stadelman <[email protected]> Date: Thu May 4 14:52:43 2017 -0400 Pass node diretly into Paragraph.new * Fix tests to match new handling of attributes witout a value Also added process method to HTMLConverterStyleTest class * Add paragraph style conversion tests * Allow unsupported text-decorations to be passed through as a toggle property This allows styles not-supported by CSS text-decoration but allowed by MS Word to function. examples include dstrike, emboss, imprint, caps, etc. * Add tests for CSS style conversion inside runs * Improve CSS style conversion unit tests * Create HTML snippets module * Add html snippets fixtures * Use HTMLSnippets module in html_test.rb * Add proper attribute merging for block level tags inside inline tags * Finish update html-content integration test * Fix comment * Update README * Add tip about regular expression to clean up whitespace in HTML * Support arbitrary node attributes on paragraphs (senny#51) * Pass node diretly into Paragraph.new * Pass definition directly into ListParagraph.new * Change argument order for Paragraph.new and ListParagraph.new * Refactor some of the logic in ast_next_paragraph into a prepare_node fucntion This function wil later on ensure all nodes have a stype attribute even if it is an empty string to avoid nil's popping up. * Use node['class'] instead of directly passing the Paragraph style in * Change node['class'] to node['pStyle'] This will work better once I get some of the attribute logic working. * Implement simple parsing of attributes * Implement parsing of nested attributes This also removes the special case of ListParagraph * Remove ListParagraph class * Refactor list testing methods to handle direct usage of pPr to store list props * Fix comment in ast.rb * Refactor pattern to_docx usage * Rename prepare_node to prepare_paragraph * Return properties from prepare_paragraph and pass onto Paragraph initialization * Remove passing of node into Parapgrah, only properities is needed * Rename Node.process_attributes into Node.process_properties It also uses the @properties isntance var instead of @attributes * Fix html converter test to use new instance var * Rewrite transform_attr to work on arrays with nested hashes This replaces the much more fragile RegExp logic in place before. * Change numPr property defintion to be a nested list of hashes This was done to match the new interface expected by transform_attr * Rubocop fix, curly bracket spacing * Update converter test to check nested property structure instead of using regexp * Fix syntax error leftover from rebase accidently killed off an `end` tag * Refactor Node.process_properties method * Slight change in default handling of node properties when value is a scalar * slight refactor of Pararaph.ppr_docx and Paragraph.to_docx * Move logic to handle properties from Node into a NodeProperties class * Minor refactor to better handle proper hashes that have keys with nil value * Implement unit tets fot NodeProperties class * Refactor to pass tagname in during instantiation so to_docx call signature is consistent * Split up node properties test method into smaller tests cases * Add paragraph factory method to node properties * refactor, put NodeProperties into separate test case. * refactor, no need to explicitly reference self. * Merge changes in upstream into feature Squashed commit of the following: commit 6ca2454 Author: Yves Senn <[email protected]> Date: Fri May 26 11:28:43 2017 +0200 refactor, no need to explicitly reference self. commit ae2c161 Author: Yves Senn <[email protected]> Date: Fri May 26 11:28:09 2017 +0200 refactor, put NodeProperties into separate test case. commit e8e77db Author: Matthew Stadelman <[email protected]> Date: Fri May 26 05:26:18 2017 -0400 Support arbitrary node attributes on paragraphs (senny#51) * Pass node diretly into Paragraph.new * Pass definition directly into ListParagraph.new * Change argument order for Paragraph.new and ListParagraph.new * Refactor some of the logic in ast_next_paragraph into a prepare_node fucntion This function wil later on ensure all nodes have a stype attribute even if it is an empty string to avoid nil's popping up. * Use node['class'] instead of directly passing the Paragraph style in * Change node['class'] to node['pStyle'] This will work better once I get some of the attribute logic working. * Implement simple parsing of attributes * Implement parsing of nested attributes This also removes the special case of ListParagraph * Remove ListParagraph class * Refactor list testing methods to handle direct usage of pPr to store list props * Fix comment in ast.rb * Refactor pattern to_docx usage * Rename prepare_node to prepare_paragraph * Return properties from prepare_paragraph and pass onto Paragraph initialization * Remove passing of node into Parapgrah, only properities is needed * Rename Node.process_attributes into Node.process_properties It also uses the @properties isntance var instead of @attributes * Fix html converter test to use new instance var * Rewrite transform_attr to work on arrays with nested hashes This replaces the much more fragile RegExp logic in place before. * Change numPr property defintion to be a nested list of hashes This was done to match the new interface expected by transform_attr * Rubocop fix, curly bracket spacing * Update converter test to check nested property structure instead of using regexp * Fix syntax error leftover from rebase accidently killed off an `end` tag * Refactor Node.process_properties method * Slight change in default handling of node properties when value is a scalar * slight refactor of Pararaph.ppr_docx and Paragraph.to_docx * Move logic to handle properties from Node into a NodeProperties class * Minor refactor to better handle proper hashes that have keys with nil value * Implement unit tets fot NodeProperties class * Refactor to pass tagname in during instantiation so to_docx call signature is consistent * Split up node properties test method into smaller tests cases * Add paragraph factory method to node properties * Fix convert_test to use assert_equals instead of assert val == val2 * Move style processing to AST classes This has the advantage that nodes need to handle CSS properties differently. i.e. vertical-align for Paragraphs and Runs * Update html sample fixture It needed updated because the document.xml no longer contained runs with extra properties already set by their parent paragraph * Update unit and integration tests to cover all styles defined * Add more unit tests to better excerise the NodeProperties class * Fix infinite loop issue in prepare_paragraph Using hash[key] would retrigger the block if key didn't exist. This was fixed by using hash.key?(key) instead which doesn't trigger the block * Add a test for unknown tags passed into prepare_paragraph
* pin ruby version at 1.1.1 for testing * Update version to require rubyzip >= 1.1.1 instead of >= 1.1 Fixes senny#57
* Create initial version of config module to register HTML tags * Add tests for Configuration::HTMLTag * Fully test the configuration module * Minor changes to configuration files and ensure allowed_children is always array of symbols * Create initial methods in converter utilizing the config and added tests for them The methods are currently unused to allow easier testing * convert properties to strings as final step in NodeProperties#filter * Add document fragment as root level tag in configuration This greatly simplifies logic when assessing parent-child validity * Fix unit tests in converter_test * Additional fixes to html element initialization. my ul and ol definitions accidentally had pstyle instead of pStyle. I also didn't need to call .to_sym on the doc fragment key. It gets converted to a symbol during HTMLTag initialization * Refactor HTML converter to use the new config module * Prevent p and div from being nested inside an inline tag * Update config to not allow mixed lists * Require all children of ol or ul tags to be an li tag or a deeper nesting of the parent tag * WIP: Create initial AST classes for a List(ul & ol) and a ListParagraph(li) This classes also define the new interface I am going to design for all AST nodes. This commit by itself does not affect normal code execution * Standardize all ast node initialization methods. #ci skip This standardization provides a lot of flexiblity while keeping everything consistent. It would also be a necessity if I allow the user to define their own AST classes. * Begin work on a revamped HTML to AST converter * Update default config to use new List and ListParagraph AST nodes * Update ast builder to properly handler node properties I previously wasn't getting styles applied correctly from pass-through nodes * Remove all extraneous code from the HTML convert class. Most of this logic has ben refactored into the ast_builder and ast node sub classes. * Refactor AST node classes to handle styles more effectively in the new system. The largest change is that lists are handled within the AST class instead of inside the converter itself * Don't convert keys to symbols inside NodeProperties#filter * Move node properties testing into a separate file The single converter_test file was becoming extremely cluttered and hard to work with. I also fixed test_transferred_properties to use the new instance method instead of a class method * Refactor NodeProperties class to setup transferred properties on initialization * Update node properties test to check transferred_properties instance var * Properly handled nested lists so they share the same numId Also added an inspect method to the List ast class and fixed the inspect method in the Paragraph ast class * Move the AST test class into it's own file. Also fixed the get_numpr_prop method * Fix List AST node so ListParagraphs not longer get nested within each other Styles also appear to properly transfer * Fix recursive method convert_style_property to exit when the Node class is encountered * Create a test file for the ast_builder (incomplete) [ci skip] * Update html_sample fixture with corrected behavior. Due to the changes I defer converting the CSS to OpenXML until I actually instantiate an AST node. That means when working with "pass-through" HTML elements that only apply a style the CSS properties get thrown around instead of WordML properties. Preiously I converted the CSS to WordML immediately and and in the case of text-decoration the WordML produced from the conversion was not always the same so it didn't get overridden properly i.e. line-through produces a w:strike while underline produces a w:u. Now due to the fact I defer conversion text-decoration will be overridden correctly as it remains 'text-decoration' until the Run AST class itself is created. * Madify style hash order so inline styles can genreally override tag styles. This is only the case for non-toggle properties or if the toggle property has a value that can be set to false. i.e. <w:u w:val="false" />. Otherwise the style will persist because CSS can only override not remove. * Strip whitespace from style properties after splitting the style string * Finish testing the ASTBuilder The remainder of the code is excercised by converter.rb * Move all AST class CSS style conversions from class constants to a config instance var This instance variable is accessed from the class level method style_conversion, which can be overriden in subclasses as desired. This allows the end user to add their own AST nodes without having to separately register their styles with the config instance. * Add methods to the configration object to add and remove CSS style conversions * Add a style converter for sz The same string to numeric conversion is used in border and font-size this pseduo key ensures that things are done consistently. * Add test to ensure newly registered tags can be converted * Add a test that converts a registered HTML node that provides it's own AST class * Add test to ensure registered style converters are successfully used * Update configuration_test to git the register and remove style converter methods * Add initial HTML tag conversion docs * Tweak comments and add content to section describing CSS style customizations * Fix grammar and readability in new Config section of README * Add Table of contents to README Generated using github-markdown-toc. https://github.com/ekalinin/github-markdown-toc * Fix typo in README [ci skip]
* Add support for <s>, <sub>, and <sup> tags to configuration * Update converter test with new unit tests for the three added tags * Update integration test to use <s>, <sub>, and <sup> in various combinations
* Limited the allowed children of block level HTML tags to only be inline This is because anything that geneates a paragraph tag (w:p) cannot be nested inside another prargraph otherwise the document will become invalid. * Add drop_text? logic to ast_builder class This matches the old behavior where text nodes that were siblings to paragraph nodes were dropped but it does it in a more formal way than just skipping that node in the processing loop. * Add comments describing each AST class in more detail. * Add to_docx and initialize method to the Node base class * Fix node#initalize and add super calls to node subclasses * Refactor Run and Paragraph AST classes to use super in their to_docx method * Simplify conditional used in Node#to_docx * Update to_docx method to handle node attributes properly Previously it would not add a space between the tag itself and the first attribute. * Give subclasses more flexibility to define child content of nodes. Previously any children needed to implement the `to_docx` method which lead to alot of structs wrapping plain text content. Now with the `children_to_docx` method a subclass can delegate that directly to it's child nodes as with Paragraph, `runs.to_docx` or specify plain text directly as the Run and Newline classes do.
* Fix bug when the user registers a new HTML tag If the user registers a new HTML tag and specifies style properties for the element using string keys the convert will attempt to process them as if they came from the `style=` attribute. For non-string values this causes an error. The fix was to onvert all property keys specified during registration to symbols. * Add test in converter_test.rb that would fail without this bugfix
@buitranquyet I've merged your PR into my fork and can confirm it works great! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR mostly for #hacktoberfest purpose. But I do used/tested in one Rails app.
In this PR:
image-support-enhancements
branch