Waylan Limberg avatar Waylan Limberg committed bda9e27

Added safe_mode tests for the modes remove and replace.

Comments (0)

Files changed (5)

markdown/tests/safe_mode/remove.html

+<p>Here's a simple block:</p>
+<p></p>
+<p>This should be a code block, though:</p>
+<pre><code>&lt;div&gt;
+    foo
+&lt;/div&gt;
+</code></pre>
+<p>As should this:</p>
+<pre><code>&lt;div&gt;foo&lt;/div&gt;
+</code></pre>
+<p>Now, nested:</p>
+<p></p>
+<p>This should just be an HTML comment:</p>
+<p></p>
+<p>Multiline:</p>
+<p></p>
+<p>Code block:</p>
+<pre><code>&lt;!-- Comment --&gt;
+</code></pre>
+<p>Just plain comment, with trailing spaces on the line:</p>
+<p></p>
+<p>Code:</p>
+<pre><code>&lt;hr /&gt;
+</code></pre>
+<p>Hr's:</p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>

markdown/tests/safe_mode/remove.txt

+Here's a simple block:
+
+<div>
+	foo
+</div>
+
+This should be a code block, though:
+
+	<div>
+		foo
+	</div>
+
+As should this:
+
+	<div>foo</div>
+
+Now, nested:
+
+<div>
+	<div>
+		<div>
+			foo
+		</div>
+	</div>
+</div>
+
+This should just be an HTML comment:
+
+<!-- Comment -->
+
+Multiline:
+
+<!--
+Blah
+Blah
+-->
+
+Code block:
+
+	<!-- Comment -->
+
+Just plain comment, with trailing spaces on the line:
+
+<!-- foo -->   
+
+Code:
+
+	<hr />
+	
+Hr's:
+
+<hr>
+
+<hr/>
+
+<hr />
+
+<hr>   
+
+<hr/>  
+
+<hr /> 
+
+<hr class="foo" id="bar" />
+
+<hr class="foo" id="bar"/>
+
+<hr class="foo" id="bar" >
+

markdown/tests/safe_mode/replace.html

+<p>Here's a simple block:</p>
+<p>[HTML_REMOVED]</p>
+<p>This should be a code block, though:</p>
+<pre><code>&lt;div&gt;
+    foo
+&lt;/div&gt;
+</code></pre>
+<p>As should this:</p>
+<pre><code>&lt;div&gt;foo&lt;/div&gt;
+</code></pre>
+<p>Now, nested:</p>
+<p>[HTML_REMOVED]</p>
+<p>This should just be an HTML comment:</p>
+<p>[HTML_REMOVED]</p>
+<p>Multiline:</p>
+<p>[HTML_REMOVED]</p>
+<p>Code block:</p>
+<pre><code>&lt;!-- Comment --&gt;
+</code></pre>
+<p>Just plain comment, with trailing spaces on the line:</p>
+<p>[HTML_REMOVED]</p>
+<p>Code:</p>
+<pre><code>&lt;hr /&gt;
+</code></pre>
+<p>Hr's:</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>

markdown/tests/safe_mode/replace.txt

+Here's a simple block:
+
+<div>
+	foo
+</div>
+
+This should be a code block, though:
+
+	<div>
+		foo
+	</div>
+
+As should this:
+
+	<div>foo</div>
+
+Now, nested:
+
+<div>
+	<div>
+		<div>
+			foo
+		</div>
+	</div>
+</div>
+
+This should just be an HTML comment:
+
+<!-- Comment -->
+
+Multiline:
+
+<!--
+Blah
+Blah
+-->
+
+Code block:
+
+	<!-- Comment -->
+
+Just plain comment, with trailing spaces on the line:
+
+<!-- foo -->   
+
+Code:
+
+	<hr />
+	
+Hr's:
+
+<hr>
+
+<hr/>
+
+<hr />
+
+<hr>   
+
+<hr/>  
+
+<hr /> 
+
+<hr class="foo" id="bar" />
+
+<hr class="foo" id="bar"/>
+
+<hr class="foo" id="bar" >
+

markdown/tests/safe_mode/test.cfg

 [DEFAULT]
 safe_mode=escape
+
+[remove]
+safe_mode=remove
+
+[replace]
+safe_mode=replace
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.