File tree Expand file tree Collapse file tree 10 files changed +18
-7
lines changed
ReverseMarkdown/Converters Expand file tree Collapse file tree 10 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 1+ ... example html * code * block
Original file line number Diff line number Diff line change @@ -1334,5 +1334,12 @@ public Task When_Strikethrough_And_Nested_Strikethrough()
13341334 var html = $ "This is the 1<s>st</s> sentence to t<del>e<strike>s</strike></strike>t the strikethrough tag conversion";
13351335 return CheckConversion ( html ) ;
13361336 }
1337+
1338+ [ Fact ]
1339+ public Task When_Spaces_In_Inline_Tags_Should_Be_Retained ( )
1340+ {
1341+ var html = $ "... example html <i>code </i>block";
1342+ return CheckConversion ( html ) ;
1343+ }
13371344 }
13381345}
Original file line number Diff line number Diff line change 4545 <None Update =" ConverterTests.When_Strikethrough_And_Nested_Strikethrough.verified.md" >
4646 <DependentUpon >ConverterTests.WhenThereIsUnorderedListAndBulletIsAsterisk_ThenConvertToMarkdownList.verified.md</DependentUpon >
4747 </None >
48+ <None Update =" ConverterTests.When_Spaces_In_Inline_Tags_Should_Be_Retained.verified.md" >
49+ <DependentUpon >ConverterTests.WhenThereIsUnorderedListWithNestedOrderedList_ThenConvertToMarkdownListWithNestedList.verified.md</DependentUpon >
50+ </None >
4851 </ItemGroup >
4952</Project >
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public Aside(Converter converter)
1313
1414 public override string Convert ( HtmlNode node )
1515 {
16- return $ "{ Environment . NewLine } { TreatChildren ( node ) . Trim ( ) } { Environment . NewLine } ";
16+ return $ "{ Environment . NewLine } { TreatChildren ( node ) } { Environment . NewLine } ";
1717 }
1818 }
1919}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public Blockquote(Converter converter) : base(converter)
1414
1515 public override string Convert ( HtmlNode node )
1616 {
17- var content = TreatChildren ( node ) . Trim ( ) ;
17+ var content = TreatChildren ( node ) ;
1818
1919 // get the lines based on carriage return and prefix "> " to each line
2020 var lines = content . ReadLines ( ) . Select ( item => "> " + item + Environment . NewLine ) ;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public override string Convert(HtmlNode node)
3131 ? " "
3232 : "" ;
3333
34- return $ "*{ content . Trim ( ) . Chomp ( all : true ) } *{ spaceSuffix } ";
34+ return $ "*{ content . Chomp ( all : true ) } *{ spaceSuffix } ";
3535 }
3636 }
3737
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public override string Convert(HtmlNode node)
1616 var indentation = IndentationFor ( node ) ;
1717 var newlineAfter = NewlineAfter ( node ) ;
1818
19- return $ "{ indentation } { TreatChildren ( node ) . Trim ( ) } { newlineAfter } ";
19+ return $ "{ indentation } { TreatChildren ( node ) } { newlineAfter } ";
2020 }
2121
2222 private static string IndentationFor ( HtmlNode node )
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public override string Convert(HtmlNode node)
2121 }
2222 else
2323 {
24- return $ "~~{ content . Trim ( ) . Chomp ( all : true ) } ~~";
24+ return $ "~~{ content . Chomp ( all : true ) } ~~";
2525 }
2626 }
2727
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public override string Convert(HtmlNode node)
2828 ? " "
2929 : "" ;
3030
31- return $ "**{ content . Trim ( ) . Chomp ( all : true ) } **{ spaceSuffix } ";
31+ return $ "**{ content . Chomp ( all : true ) } **{ spaceSuffix } ";
3232 }
3333 }
3434
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public override string Convert(HtmlNode node)
1919 }
2020 else
2121 {
22- return $ "^{ content . Trim ( ) . Chomp ( all : true ) } ^";
22+ return $ "^{ content . Chomp ( all : true ) } ^";
2323 }
2424 }
2525
You can’t perform that action at this time.
0 commit comments