This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Added description about Sablon#5
Open
bshourse wants to merge 3 commits into
Open
Conversation
bshourse
commented
Feb 11, 2023
- Added a description of the gem Sablon.
- Also created a module in which you can add your methods for Markdown formatting(for example displaying ruby code formatting)
aa9fd09 to
9edb6ec
Compare
9edb6ec to
498e1c9
Compare
Member
igor-alexandrov
left a comment
There was a problem hiding this comment.
@bshourse Dima, thanks for your PR, please take a look at my comments.
Comment on lines
+5
to
+10
| def ruby_example_code(text) | ||
| (+'```ruby') << "\n#{text}\n```" | ||
| end |
Member
There was a problem hiding this comment.
What do you think about renaming this to code_block(language, text=nil, &block) or something?
| "\n\ntemplate.render_to_file File.expand_path('~/Users/bs/Documents/output.docx'), context" | ||
|
|
||
| pros "We've been usi Sablon in some projects for inserting content in docx templates." | ||
| pros "It is easy to use this gem:\n #{Utils.ruby_example_code(text)}" |
Member
There was a problem hiding this comment.
Please avoid using Utils directly in Markdown. Better create anonymous class that encapsulates all necessary helpers in Curated class. You can take a look at similar definition here: https://github.com/jetrockets/curated/blob/main/lib/curated/renderer.rb#L15.
Author
There was a problem hiding this comment.
Thanks for the new thoughts. May you please see the new implementation?
added 3 commits
February 23, 2023 03:11
… helpers in anonymous class.
498e1c9 to
5a2aab2
Compare
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.