Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Render LINEBREAK as simple line break instead of new paragraph #152

Merged
merged 2 commits into from

3 participants

@Soryu

"When you do want to insert a break tag using Markdown, you end a line with two or more spaces, then type return."

refs #141

@cwc
Collaborator
cwc commented

LGTM

@DDRBoxman DDRBoxman merged commit f9f276d into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
7 platform/ios/Bypass/Bypass/BPAttributedStringConverter.m
@@ -134,6 +134,11 @@ - (void)insertNewlineIntoTarget:(NSMutableAttributedString *)target
[target appendAttributedString:[[NSMutableAttributedString alloc] initWithString:@"\n"]];
}
+- (void)insertLineSeparatorIntoTarget:(NSMutableAttributedString *)target
+{
+ [target appendAttributedString:[[NSMutableAttributedString alloc] initWithString:@"\u2028"]];
+}
+
#pragma mark Span Element Rendering
- (void)renderSpanElement:(BPElement *)element
@@ -234,7 +239,7 @@ - (void)renderLinkElement:(BPElement *)element
- (void)renderLineBreak:(BPElement *)element
toTarget:(NSMutableAttributedString *)target
{
- [self insertNewlineIntoTarget:target];
+ [self insertLineSeparatorIntoTarget:target];
}
#pragma mark Block Element Rendering
View
3  platform/ios/BypassSample/BypassSample/sample.markdown
@@ -3,7 +3,8 @@
###Even smaller header
Paragraphs are obviously supported along with all the fancy text styling you could want.
-There is *italic*, **bold** and ***bold italic***. Even links are supported, visit the
+There is *italic*, **bold** and ***bold italic***.
+Even links are supported, visit the
github page for Bypass [here](https://github.com/Uncodin/bypass).
* Nested List
Something went wrong with that request. Please try again.