diff --git a/exercises/markdown/Example.fs b/exercises/markdown/Example.fs index cfc4f5651..dbd23a81b 100644 --- a/exercises/markdown/Example.fs +++ b/exercises/markdown/Example.fs @@ -12,8 +12,8 @@ let boldMarkdown = "__" let italicMarkdown = "_" let listItemMarkdown = "*" -let boldTag = "em" -let italicTag = "i" +let boldTag = "strong" +let italicTag = "em" let paragraphTag = "p" let listTag = "ul" let listItemTag = "li" diff --git a/exercises/markdown/Markdown.fs b/exercises/markdown/Markdown.fs index ce0771af4..b3995f8e8 100644 --- a/exercises/markdown/Markdown.fs +++ b/exercises/markdown/Markdown.fs @@ -26,10 +26,10 @@ let rec parse (markdown: string) = if __pos' > -1 then if __pos + 2 >= (line.Length - 1) then - line <- line.[0.. __pos - 1] + "" + line.[__pos + 2 .. __pos' - 1] + "" + line <- line.[0.. __pos - 1] + "" + line.[__pos + 2 .. __pos' - 1] + "" __pos <- __pos' + 1 else - line <- line.[0.. __pos - 1] + "" + line.[__pos + 2 .. __pos' - 1] + "" + line.[__pos' + 2 ..] + line <- line.[0.. __pos - 1] + "" + line.[__pos + 2 .. __pos' - 1] + "" + line.[__pos' + 2 ..] __pos <- __pos' + 1 else __pos <- -1 @@ -41,10 +41,10 @@ let rec parse (markdown: string) = if __pos' > -1 then if __pos + 1 >= (line.Length - 1) then - line <- line.[0.. __pos - 1] + "" + line.[__pos + 1 .. __pos' - 1] + "" + line <- line.[0.. __pos - 1] + "" + line.[__pos + 1 .. __pos' - 1] + "" __pos <- __pos' + 1 else - line <- line.[0.. __pos - 1] + "" + line.[__pos + 1 .. __pos' - 1] + "" + line.[__pos' + 1 ..] + line <- line.[0.. __pos - 1] + "" + line.[__pos + 1 .. __pos' - 1] + "" + line.[__pos' + 1 ..] __pos <- __pos' + 1 else __pos <- -1 @@ -75,10 +75,10 @@ let rec parse (markdown: string) = if __pos' > -1 then if __pos + 2 >= (line.Length - 1) then - line <- line.[0.. __pos - 1] + "" + line.[__pos + 2 .. __pos' - 1] + "" + line <- line.[0.. __pos - 1] + "" + line.[__pos + 2 .. __pos' - 1] + "" __pos <- __pos' + 1 else - line <- line.[0.. __pos - 1] + "" + line.[__pos + 2 .. __pos' - 1] + "" + line.[__pos' + 2 ..] + line <- line.[0.. __pos - 1] + "" + line.[__pos + 2 .. __pos' - 1] + "" + line.[__pos' + 2 ..] __pos <- __pos' + 1 else __pos <- -1 @@ -90,10 +90,10 @@ let rec parse (markdown: string) = if __pos' > -1 then if __pos + 1 >= (line.Length - 1) then - line <- line.[0.. __pos - 1] + "" + line.[__pos + 1 .. __pos' - 1] + "" + line <- line.[0.. __pos - 1] + "" + line.[__pos + 1 .. __pos' - 1] + "" __pos <- __pos' + 1 else - line <- line.[0.. __pos - 1] + "" + line.[__pos + 1 .. __pos' - 1] + "" + line.[__pos' + 1 ..] + line <- line.[0.. __pos - 1] + "" + line.[__pos + 1 .. __pos' - 1] + "" + line.[__pos' + 1 ..] __pos <- __pos' + 1 else __pos <- -1 diff --git a/exercises/markdown/MarkdownTest.fs b/exercises/markdown/MarkdownTest.fs index b9f062599..0a2dab2d7 100644 --- a/exercises/markdown/MarkdownTest.fs +++ b/exercises/markdown/MarkdownTest.fs @@ -13,19 +13,19 @@ let ``Parses normal text as a paragraph`` () = [] let ``Parsing italics`` () = let input = "_This will be italic_" - let expected = "

This will be italic

" + let expected = "

This will be italic

" Assert.That(parse input, Is.EqualTo(expected)) [] let ``Parsing bold text`` () = let input = "__This will be bold__" - let expected = "

This will be bold

" + let expected = "

This will be bold

" Assert.That(parse input, Is.EqualTo(expected)) [] let ``Mixed normal, italics and bold text`` () = let input = "This will _be_ __mixed__" - let expected = "

This will be mixed

" + let expected = "

This will be mixed

" Assert.That(parse input, Is.EqualTo(expected)) [] @@ -55,5 +55,5 @@ let ``Unordered lists`` () = [] let ``With a little bit of everything`` () = let input = "# Header!\n* __Bold Item__\n* _Italic Item_" - let expected = "

Header!

  • Bold Item
  • Italic Item
" + let expected = "

Header!

  • Bold Item
  • Italic Item
" Assert.That(parse input, Is.EqualTo(expected)) \ No newline at end of file