diff --git a/Core-Tests/ReverseFormatterTests.cs b/Core-Tests/ReverseFormatterTests.cs index 8677a00..4aaeb7b 100644 --- a/Core-Tests/ReverseFormatterTests.cs +++ b/Core-Tests/ReverseFormatterTests.cs @@ -26,12 +26,13 @@ namespace ScrewTurn.Wiki.Tests { [TestCase("text", "{{'''text'''}}")] [TestCase("
text
", "(((text))){br}")] [TestCase("
text
", "text{br}")] - [TestCase("
  1. 1
  2. 2
  3. 3
    1. 3.1
    2. 3.2
      1. 3.2.1
    3. 3.3
  4. 4

", "# 1\r\n# 2\r\n# 3\r\n## 3.1\r\n## 3.2\r\n### 3.2.1\r\n## 3.3\r\n# 4\r\n# \r\n{br}{br}")] + [TestCase("
  1. 1
  2. 2
  3. 3
    1. 3.1
    2. 3.2
      1. 3.2.1
    3. 3.3
  4. 4

", "# 1\r\n# 2\r\n# 3\r\n## 3.1\r\n## 3.2\r\n### 3.2.1\r\n## 3.3\r\n# 4\r\n# {br}\r\n{br}{br}")] [TestCase("
  1. 1
  2. 2
", "# 1\r\n# 2\r\n{br}")] [TestCase("", "* 1\r\n* 2\r\n{br}")] [TestCase("", "* Punto 1\r\n* Punto 2\r\n* Punto 3\r\n* Punto 4\r\n* Punto 5\r\n{br}")] [TestCase("", "* it 1\r\n** 1.1\r\n** 1.2\r\n* it2\r\n{br}")] [TestCase("", "* it 1\r\n*# 1.1\r\n*# 1.2\r\n* it2\r\n{br}")] + [TestCase("", "* '''1'''\r\n* 2\r\n{br}")] [TestCase("I'm an anchor", "[anchor|#init]I'm an anchor")] [TestCase("This recall an anchor", "[#init|This recall an anchor]")] [TestCase("BIG TITLE", "[^google.com|BIG TITLE]")] diff --git a/Core/ReverseFormatter.cs b/Core/ReverseFormatter.cs index eadf527..3865e49 100644 --- a/Core/ReverseFormatter.cs +++ b/Core/ReverseFormatter.cs @@ -100,7 +100,7 @@ namespace ScrewTurn.Wiki { result += processList(child.ChildNodes, marker + ul); break; default: - StringReader a = new StringReader(child.InnerText); + StringReader a = new StringReader(child.OuterXml); XmlDocument n = FromHTML((TextReader)a); result += marker + " " + processChild(n.ChildNodes) + "\r\n"; break;