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

Added support for {{<directive>}} directives such as table of contents. #115

Merged
merged 3 commits into from
Dec 13, 2015

Conversation

creynold
Copy link

@creynold creynold commented Dec 9, 2015

I added a function applyDirectives which looks for {{.*}} including newlines. It then replaces the {{.*}} match with the return of functions from directives.js. As an example:

If the wiki text is:

{{sequence

A->B: something
}}

Then applyDirectives will pass the full text of the wiki and A->B: something respectively to the function directives.directiveMap.sequence. The return of this function will replace the braced text.

@creynold
Copy link
Author

creynold commented Dec 9, 2015

Don't want to step on anyone's toes.. I just saw a PR for TOC as well. Thought this way might allow for future flexibility as well as plugging in third party packages.

@claudioc
Copy link
Owner

claudioc commented Dec 9, 2015

No problem, it's just funny that after I had the "TOC" issue open for... ever? now two PR came in almost at the same time fixing it :)

Regarding the directive thing, I think it's a cool idea. I will take a look at it (testing and adding doc if needed) asap... unfortunately at the moment we are very busy releasing a product for December, which means I need to work on weekend too. Have patience.

Thanks!

@creynold
Copy link
Author

creynold commented Dec 9, 2015

Cool, thanks! No rush obviously :)

claudioc added a commit that referenced this pull request Dec 13, 2015
Added support for {{<directive>}} directives such as table of contents.
@claudioc claudioc merged commit 607dc18 into claudioc:master Dec 13, 2015
This was referenced Dec 13, 2015
claudioc added a commit that referenced this pull request Dec 13, 2015
- Adds the ability to revert to a specific revision from the history
page (@brad7928)
- Adds support for directives (see PR #115) (@creynold)
- Adds support for Table of Contents (@creynold and @brad7928)
- Adds a new `emptyEmailMatches` configuration parameter (see README)
- Added the /etc configuration directory (for useful configurations we
may need)
- Fixes #110 (@brad7928)
- Fixes #109
- Fixes #10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants