You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, it would be nice to optionally pass in an array of excluded Markdown methods when calling Faker::Markdown.random so that you can selectively choose what you are randomly getting. I would be willing to submit a PR for this if it is something the community would like.
An example of how it could work would be with a call like this: Faker::Markdown.random(exclude: [:headers])
Which will perform the random method, but never generate a header. This feature could allow for generating fake blog articles that add headers selectively, but still easily allow adding other elements between Faker::Lorem and Faker::Markdown to make the fake blog articles seem more realistic instead of potentially having 4 sets of headers and no real content between the headers.
The text was updated successfully, but these errors were encountered:
I think it might be cool to solve this problem a different way with what I will call a markdown sandwich (inspired by the s*** sandwich criticism technique). So you can use Markdown.sandwich(5) and you get:
header
5 sentence lorem ipsum paragraph
random markdown element
so it looks like a real blog post.
Markdown.sandwich(6,3) should produce
header
6 sentence lorem paragraph
random markdown
6 sentence lorem paragraph
random markdown
6 sentence lorem paragraph
random markdown
...so a pair of lorem-markdown content repeats 3 times (2nd arg) for longer form stuff.
Basically, it would be nice to optionally pass in an array of excluded Markdown methods when calling Faker::Markdown.random so that you can selectively choose what you are randomly getting. I would be willing to submit a PR for this if it is something the community would like.
An example of how it could work would be with a call like this:
Faker::Markdown.random(exclude: [:headers])
Which will perform the random method, but never generate a header. This feature could allow for generating fake blog articles that add headers selectively, but still easily allow adding other elements between
Faker::Lorem
andFaker::Markdown
to make the fake blog articles seem more realistic instead of potentially having 4 sets of headers and no real content between the headers.The text was updated successfully, but these errors were encountered: