Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allows blank lines to be counted as code fragments, addresses #189 #190

Merged
merged 1 commit into from Apr 4, 2013

Conversation

Projects
None yet
2 participants
Contributor

00dani commented Apr 4, 2013

This makes it possible to have adjacent blocks of comments where the later
block is directly related to the following snippet; examples are given in #189,
as well as below:

# This is an introductory paragraph that explains the junk we're gonna do in
# this part of the code in detail.

# This is a paragraph of information about the first snippet of code; the
# following code snippet will align with this paragraph, not the previous one.
#
# This is another paragraph of info about the following code snippet. Note that
# the code will not align with this paragraph but with the previous one.
thisIsTheCode
@00dani 00dani Allows blank lines to be counted as code fragments, addresses #189
This makes it possible to have adjacent blocks of comments where the later
block is directly related to the following snippet; examples are given in #189.
bb03c3d
Contributor

00dani commented Apr 4, 2013

It looks like implementing that is actually extremely simple. I tested the changed Docco on its own source, along with a couple of my own files, and it appears to work fine. (There doesn't appear to be an actual test suite, so I didn't run one.)

Owner

jashkenas commented Apr 4, 2013

... I don't really understand why the index.html output changed here ... but sure -- let's give it a try.

@jashkenas jashkenas merged commit bb03c3d into jashkenas:master Apr 4, 2013

Contributor

00dani commented Apr 4, 2013

While testing out the change, as mentioned, I ran Docco over its own source, hence the change to index.html; I wasn't quite sure whether I was meant to commit the documentation file or not. It looks like the version of index.html previously checked into the repo wasn't actually based on a recent version of the source anyway, incidentally?

@marchaefner marchaefner added a commit to marchaefner/docco that referenced this pull request Apr 8, 2013

@marchaefner marchaefner Fix and improve literal mode.
  * Require a blank line as delimiter between text and code.
  * Don't ignore indentation with mixed whitespace.
  * Handle blank lines depending on preceding lines.
    (Addresses changes in #190.)
  * Bonus: Remove unused variable (leftover from #190).
b5eb357
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment