mirror of
https://github.com/wassname/side-by-side.git
synced 2026-09-09 11:34:24 +08:00
Don't add dummy foreword
This commit is contained in:
@@ -39,10 +39,6 @@ angular.module("sideBySide").factory("markdownReader", () ->
|
||||
readContent = (lexed, separators) ->
|
||||
content = []
|
||||
|
||||
# if first block is separator, add dummy foreword
|
||||
if lexed[0]["type"] in separators
|
||||
lexed.unshift({type: "paragraph", text: ""})
|
||||
|
||||
while lexed.length > 0
|
||||
heading = if lexed[0]["type"] in separators \
|
||||
then lexed.shift().text or "" \
|
||||
|
||||
@@ -35,7 +35,6 @@ test("markdownReader", () ->
|
||||
Source: '<a href="http://en.wikisource.org/wiki/Universal_Declaration_of_Human_Rights">http://en.wikisource.org/wiki/Universal_Declaration_of_Human_Rights</a>'
|
||||
}
|
||||
content: [
|
||||
{ section: "", text: "<p></p>\n" }
|
||||
{ section: "1", text: "<p>All human beings are born <em>free</em> and equal in dignity and rights...</p>\n" }
|
||||
{ section: "2", text: """
|
||||
<p>Everyone is entitled to all the rights and freedoms...</p>
|
||||
@@ -92,7 +91,6 @@ test("markdownReader", () ->
|
||||
Separator: "heading"
|
||||
}
|
||||
content: [
|
||||
{ section: "", text: "<p></p>\n" }
|
||||
{ section: "I", text: """
|
||||
<p>First section.</p>
|
||||
<hr>
|
||||
|
||||
Reference in New Issue
Block a user