Long content in backticks (e.g.
Object.prototype.hasOwnProperty) can lead to text overflowing into the right margin.
This is a nasty bug that pops up on rare occasions when a long code span containing no whitespace appears near the end of a line. We currently are not sure of how to fix it.
In terms of workarounds, there's a straightforward one: add a line break (not new paragraph) first.
The way you do this varies based on the Markdown dialect you are using to write your book.
If you are using Leanpub Flavoured Markdown, which is currently the default, here's what you do:
At the end of a line, add two spaces, then a single newline.
If you are using Markua, here's what you do:
At the end of a line, add a single newline.
By the way, the differences in newline handling in Markua are discussed here:
To see what Markdown dialect you're using, or to change between Leanpub Flavoured Markdown and Markua, go to:
Related Article: My code samples are having a backslash \ added to them on long lines. Help!
If you have any feedback or questions about this article, please email the Leanpub team about it at firstname.lastname@example.org!
If you have any questions or thoughts on writing and self-publishing with Leanpub, please join our global community of authors in our Authors Forum here!
Are you interested in self-publishing, and creating your first Leanpub book? Here are some quick tutorials for our most popular writing modes: http://help.leanpub.com/en/articles/3088382-quick-walkthroughs-for-getting-started-on-a-leanpub-book
Are you looking for great deals on Leanpub ebooks, ebook bundles, and courses? Sign up for our Weekly and Monthly newsletter sales here!
Subscribe to our YouTube channel here: https://www.youtube.com/leanpub
Please subscribe to our YouTube channel here: https://www.youtube.com/leanpub
You can also follow Leanpub in lots of other places!