Documentation fixes for markdown intra-word italics and adding ruby markdown blocks #195

Merged
merged 5 commits into from Jan 2, 2013

Conversation

Projects
None yet
3 participants
Member

soulcutter commented Dec 31, 2012

I also reported the fixing the intra-word italics thing as a bug/feature request to relishapp. github flavored markdown and stackoverflow markdown both treat this differently IINM. This PR fixes more issues regardless, but I figured I'd mention it in case anybody had the notion to bug @mattwynne about it 😃

@myronmarston myronmarston and 1 other commented on an outdated diff Dec 31, 2012

features/built_in_matchers/be.feature
@@ -2,10 +2,12 @@ Feature: "be" matchers
There are several related "be" matchers:
- obj.should be_true # passes if obj is truthy (not nil or false)
- obj.should be_false # passes if obj is falsy (nil or false)
- obj.should be_nil # passes if obj is nil
- obj.should be # passes if obj is truthy (not nil or false)
+ """ruby
+ obj.should be_true # passes if obj is truthy (not nil or false)
+ obj.should be_false # passes if obj is falsy (nil or false)
+ obj.should be_nil # passes if obj is nil
+ obj.should be # passes if obj is truthy (not nil or false)
+ """
@myronmarston

myronmarston Dec 31, 2012

Owner

I know this works for multiline strings within individual steps, but I wasn't aware it could be used in the intro section like this. @mattwynne -- will this render correctly on relish?

@soulcutter

soulcutter Dec 31, 2012

Member

Crap, I don't think cucumber likes this. Back to the drawing board...

@soulcutter

soulcutter Dec 31, 2012

Member

Actually it looks like the LexingError I was seeing was from starting a line with an octothorpe. I believe this formatting will work in relish because it's standard markdown IINM, and is definitely being processed with markdown

@myronmarston

myronmarston Jan 1, 2013

Owner

I had to look up the word "octothorpe" as I've never heard the term before...

Anyhow, you mention it's standard markdown but I'm actually not sure about that...the original markdown docs mention 4-space indentation for code blocks. No mention is made of the """ruby syntax.

I don't think it works with github's markdown processor, either:

"""ruby
def main
puts "hello, world"
end
"""

Let's wait until @mattwynne chimes in with what the best way to format this for relish is.

@soulcutter

soulcutter Jan 1, 2013

Member

HMM, well if the triple quote doesn't work, then triple backtick probably does

def main
  puts "hello, world"
end
@myronmarston

myronmarston Jan 1, 2013

Owner

Triple backtick is one of github's extensions to markdown--so it works fine in comments here on github, but I don't know which flavor of markdown relishapp uses.

@soulcutter

soulcutter Jan 1, 2013

Member

Rather than wait, I figured I'd experiment with relishapp with my gem Saxerator. It looks like the triple backticks are the way to go: https://www.relishapp.com/soulcutter/saxerator/v/0-7-1/docs/dsl-predicates/all - source

I will make the necessary modifications to this pull request. Thanks for catching this, it was a learning experience for me playing with relishapp!

Member

soulcutter commented Jan 2, 2013

Ok, I think this is good to go. I verified that the triple backtick ruby markdown blocks work as expected on relishapp

@myronmarston myronmarston added a commit that referenced this pull request Jan 2, 2013

@myronmarston myronmarston Merge pull request #195 from soulcutter/docs-normalization
Documentation fixes for markdown intra-word italics and adding ruby markdown blocks
e102336

@myronmarston myronmarston merged commit e102336 into rspec:master Jan 2, 2013

1 check passed

default The Travis build passed
Details
Owner

myronmarston commented Jan 2, 2013

Thanks @soulcutter. These sorts of fixes aren't usually "fun" and don't get much credit but they're important and I appreciate it!

Okay I'm here. Is there still something I need to fix in Relish?

Owner

myronmarston commented Jan 2, 2013

Okay I'm here. Is there still something I need to fix in Relish?

Nope. We were just trying to figure out what the best way is to put code sections in the free-text feature description part of a feature file so that they render well on relish. @soulcutter figured it out through trial and error. Thanks for checking in, though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment