Skip to content
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

Asterisk wall interpreted as a list #347

Closed
jverkoey opened this issue Nov 10, 2015 · 3 comments · Fixed by #349
Closed

Asterisk wall interpreted as a list #347

jverkoey opened this issue Nov 10, 2015 · 3 comments · Fixed by #349
Assignees
Labels
Milestone

Comments

@jverkoey
Copy link
Collaborator

It's not uncommon to see comment blocks like

/**
 *
 *
 *
 */

These comment blocks are interpreted as a ul, presumably by the markdown parser.

I realize Swift docs generally don't use the asterisk wall, but this presents somewhat of a challenge for the ObjC code that does :)

@jpsim
Copy link
Collaborator

jpsim commented Nov 10, 2015

Ah, thanks for letting me know... I may be naïve, but I think solving this may be as simple as adding the asterisk to the whitespace and newline character set used here: https://github.com/jpsim/SourceKitten/blob/master/Source/SourceKittenFramework/String+SourceKitten.swift#L301-L319

What do you think?

@jverkoey
Copy link
Collaborator Author

Oh, nifty! That sounds like exactly the place to fix this :) Lemme try putting together a PR quick.

@jverkoey
Copy link
Collaborator Author

What was lineLeadingWhitespace != line.characters.count guarding against? I'm considering removing it because it causes empty lines like _* not to be considered (where _ is a space).

/**
_*_Some text
_*
_*/

In that case _*_ is being selected as the prefix which ends up leaving the _* line untrimmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants