-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List Identation #52
Comments
@cpvbruno as a temporary solution I've changed class MyMarkdownList: MarkdownList {
override func formatText(_ attributedString: NSMutableAttributedString, range: NSRange, level: Int) {
var string = (0..<level).reduce("") { (string, _) -> String in
return "\(string)\(separator)"
}
string = "\(string)\(indicator) "
let paragraphStyle = NSMutableParagraphStyle()
let nonOptions = [NSTextTab.OptionKey: Any]()
paragraphStyle.tabStops = [
NSTextTab(textAlignment: .left, location: 20, options: nonOptions)]
paragraphStyle.defaultTabInterval = 20
paragraphStyle.headIndent = 10
paragraphStyle.lineSpacing = 0.5
paragraphStyle.paragraphSpacing = 12
attributedString.addAttributes(
[NSAttributedString.Key.paragraphStyle : paragraphStyle],
range: NSMakeRange(0, attributedString.length))
attributedString.replaceCharacters(in: range, with: string)
}
}
} |
I am facing the same problem as @cpvbruno describes. I'm using v1.6.0 of this repository. Also... how can I apply the solution @keylook has described?
What am I missing here? |
You must disable the |
@t651330 Could you provide an example? |
I was trying this library and faced the issue that lists doesn't have the correct indentation, like when the content of a line from a list breaks line, the second line starts below the "●" indicator.
What I would expect is to start below of the first character fo the first line
The text was updated successfully, but these errors were encountered: