I am reading an attributed string and breaking it up into text runs using attributesAtIndex:longestEffectiveRange:inRange:, now I need to break the resulting ranges of text into any lines ends and paragraph ends that occur within the range, so that I can output <br /> and <p / > tags in the code at the line breaks and paragraph breaks respectively, and process the text between the line/paragraph breaks separately.

The problem is that getLineStart:end:contentsEnd:forRange: and getParagraphStart:end:contentsEnd:forRange: seem to both detect line breaks and call them paragraph breaks. I don't really understand what the difference is between these two methods. What does it count as a line and what as a paragraph? Seeing as a paragraph break is also counted as a line break, what is the best way to emit either a <p /> or a <br /> but not both? Is there a way of typing a line break (not a paragraph break) in an NSTextVew?

Any suggestions on the best way to handle this would be appreciated.

TIA

Gideon
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to