Skip to content

Commit

Permalink
Bug fix for markdown support
Browse files Browse the repository at this point in the history
Added in markdown support for descriptions (using Pagedown for basic
markdown support and Pagedown extra for extended markdown).  Added
Markdown feature file example.  Removed unused files.
  • Loading branch information
Aaron Rich committed Oct 17, 2013
1 parent 90c2be8 commit 1ee631b
Show file tree
Hide file tree
Showing 20 changed files with 2,516 additions and 23,215 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Feature: Showing basic gherkin syntax
In order to see that gherkin is a very simple langauge
As a SpecFlow evangelist
I want to show that basic syntax
In order to see that gherkin is a very simple langauge
As a SpecFlow evangelist
I want to show that basic syntax

![Test Image](test.jpg)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Feature: The test runner is not (very) important
In order to show that the test runner is just for the autogenerated stuff in SpecFlow
As a SpecFlow evanglist
I want to be able to call my steps in the same manner inspite of the testrunner configured
In order to show that the test runner is just for the autogenerated stuff in SpecFlow
As a SpecFlow evanglist
I want to be able to call my steps in the same manner inspite of the testrunner configured

Scenario: A couple of simple steps
Given I have step defintions in place
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Feature: Sample Markdown Feature
Header 1
========

Header 2
--------

This is a *significant* word

1. Ordered #1
2. Ordered #2
3. Ordered #3

- Unordered #1
- Unordered #2
- Unordered #3

Horizontal Rule:
- - -

Table example:
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |

- - -

Scenario: Sample Markdown Scenario Example

This is **important** text

Code Block:
```
var x = 2;
```

Apple
: Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.
: An American computer company.

Orange
: The fruit of an evergreen tree of the genus Citrus.

Given this
Then that

@AddingATag
Scenario Outline: Sample Markdown Scenario Outline Example

This is [an example link to pickles](https://github.com/picklesdoc/pickles/wiki "Pickles") inline link.

[This link to pickles](https://github.com/picklesdoc/pickles/wiki) has no title attribute.

Given this: <test>
Then that: <test2>

Examples:

This __message__ is important too and is for an *Example* table.

| test | test2 |
| value | value2 |

45 changes: 26 additions & 19 deletions src/Pickles/Pickles.BaseDhtmlFiles/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="author" content="">

<!-- Le styles -->
<link href="css/bootstrap.css" rel="stylesheet" />
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/styles.css" rel="stylesheet" />
<link href="css/print.css" rel="stylesheet" media="print" />
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
Expand All @@ -20,7 +20,7 @@
<body>

<script type="text/html" id="features-template">
<div style="padding: 5px" class="feature" data-bind="click: $root.showFeature.bind(Path)"><a data-bind="text: Name, click: $root.showFeature.bind(Path)" href="#"></a></div>
<div style="padding: 5px" class="feature" data-bind="click: $root.showFeature.bind(Path)"><a data-bind=" text: Name, click: $root.showFeature.bind(Path)" href="#"></a></div>
</script>

<script type="text/html" id="featuresByFolder-template">
Expand All @@ -43,8 +43,10 @@

<script type="text/html" id="steps-template">
<li class="step">
<span class="keyword" data-bind="text: NativeKeyword"></span><span data-bind="text:Name"></span>
<div data-bind="if: DocStringArgument != ''"><div data-bind="text: DocStringArgument" class="pre"></div></div>
<span class="keyword" data-bind="text: NativeKeyword"></span><span data-bind=" text: Name"></span>
<div data-bind="if: DocStringArgument != ''">
<div data-bind="text: DocStringArgument" class="pre"></div>
</div>
<div data-bind="template: { name: 'table-template', data: $data }"></div>
</li>
</script>
Expand Down Expand Up @@ -103,13 +105,14 @@
<!-- /ko -->
</div>
<h1 data-bind="text: Name" class="canHighlight"></h1>
<h5 data-bind="text: Description" class="pre"></h5>
<div class="description" data-bind="html: renderMarkdownBlock(Description)"></div>
</div>

<div class="row-fluid" data-bind="with: Feature">
<div class="row-fluid" data-bind="if: Background.Steps">
<div class="scenario">
<h4>Background:</h4>
<div class="description" data-bind="html: renderMarkdownBlock(Description)"></div>
<ul data-bind="template: { name: 'steps-template', foreach: Background.Steps }"></ul>
</div>
</div>
Expand All @@ -125,18 +128,20 @@ <h4>Background:</h4>

<div class="scenario">
<div data-bind="template: { name: 'testResults-template', data: Result }"></div>

<div>
<h4 data-bind="text: Name" class="canHighlight"></h4>
<div class="description" data-bind="html: renderMarkdownBlock(Description)"></div>
</div>

<div class="steps">

<ul data-bind="template: { name: 'steps-template', foreach: Steps }"></ul>

<ul data-bind="foreach: Examples">
<li class="step">
<div><strong>Examples:</strong> <span data-bind="text: Name"></span></div>
<div class="description" data-bind="html: renderMarkdownBlock(Description)"></div>
<div data-bind="template: { name: 'table-template', data: $data }"></div>
</li>
</ul>
Expand Down Expand Up @@ -168,18 +173,20 @@ <h4 data-bind="text: Name" class="canHighlight"></h4>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/jquery-1.8.3.js" type="text/javascript"></script>
<script src="js/bootstrap.js"></script>
<script src="js/knockout-2.2.0.debug.js"></script>
<script src="js/knockout.mapping-latest.debug.js"></script>
<script src="js/underscore.js"></script>
<script src="js/jquery.highlight.js"></script>
<script src="js/featuresModel.js"></script>
<script src="js/logger.js"></script>
<script src="js/stringFormatting.js"></script>
<script src="js/heirarchyBuilder.js"></script>
<script src="js/typeaheadList.js"></script>
<script src="js/featureSearch.js"></script>
<script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="js/knockout-2.2.0.js" type="text/javascript"></script>
<script src="js/knockout.mapping-latest.js" type="text/javascript"></script>
<script src="js/underscore-min.js" type="text/javascript"></script>
<script src="js/jquery.highlight-4.closure.js"></script>
<script src="js/Markdown.Converter.js" type="text/javascript"></script>
<script src="js/Markdown.Extra.js" type="text/javascript"></script>
<script src="js/featuresModel.js" type="text/javascript"></script>
<script src="js/logger.js" type="text/javascript"></script>
<script src="js/stringFormatting.js" type="text/javascript"></script>
<script src="js/heirarchyBuilder.js" type="text/javascript"></script>
<script src="js/typeaheadList.js" type="text/javascript"></script>
<script src="js/featureSearch.js" type="text/javascript"></script>
<script type="text/javascript">
function ViewModel(features) {
var self = this;
Expand Down
Loading

0 comments on commit 1ee631b

Please sign in to comment.