-
Notifications
You must be signed in to change notification settings - Fork 191
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
Unable to markdown text if there are indents #143
Comments
I just did a quick test. The first example seems to be parsed as an indented code block - which is part of the spec, while the latter is parsed as a list. If you'd like both to be parsed as lists, then I believe the number of spaces in the first example should be less than four. |
This is a result of Swift's syntax for multi-line string literals - the "beginning of the line" is determined by how indented the closing let str = """
Creates a personalized greeting for a recipient.
- Parameter recipient: The person being greeted.
- Throws: `MyError.invalidRecipient` if `recipient` is "Derek" (he knows what he did).
- Returns: A new string saying hello to `recipient`.
""" |
Indented code blocks are a feature of basic Markdown; automatically stripping leading indentation would remove a foundational feature of Markdown syntax. This seems to be an issue in SwiftSyntax; all the reference documentation i could find about multi-line comments just says that the comment is the content between the |
Unable to markdown text if there is a static indents before each line
//Bug
//No problem
The text was updated successfully, but these errors were encountered: