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

Strip newlines/whitespace from code #20

Closed
ashfurrow opened this issue Aug 28, 2016 · 2 comments
Closed

Strip newlines/whitespace from code #20

ashfurrow opened this issue Aug 28, 2016 · 2 comments

Comments

@ashfurrow
Copy link
Member

Code blocks like this come out with extra whitespace around them:

//// Page whatever

doSomething()

/*:
 Text
*/

Is translated to:

doSomething()

With extra newlines at the bottom.

A PR fixing this issue should strip whitespace from the beginning/end of a page's code.

@ashfurrow
Copy link
Member Author

Looks like Swift Playgrounds automatically strips whitespace from the beginning/end of a file, which is handy.

@ashfurrow
Copy link
Member Author

So basically we'd need to strip the page contents of any newlines that exist adjacent to markdown blocks. Examples:


//:


/*:
 */

Should be doable with regexes, needs to be well-tested.

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

No branches or pull requests

1 participant