Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(util-fns): generalize getExampleName() #1666

Closed

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Jun 14, 2016

For some chapters the Jade source file name (e.g., toh-pt6.jade) does not match with the example directory name (toh-6). For such cases, we can now set _example to, say toh-6; getExampleName() will now use _example if set, otherwise determine the name from current as it did before.

@chalin
Copy link
Contributor Author

chalin commented Jun 14, 2016

@Foxandxss : ready for review and merge.
cc @kwalrath

@Foxandxss
Copy link
Member

So with this, we can define a _example variable in the .jade so we can do better on the example paths through the jade?

@chalin
Copy link
Contributor Author

chalin commented Jun 14, 2016

Yes. E.g., toh-pt6.jade will soon have:

- var _example = 'toh-6';

at the top. Then the functions and mixins in the _utls-fns.jade files can uniformly call getExapleName() without concern of the means by which the name is obtained.

@chalin chalin force-pushed the chalin-jade-util-get-example-name-0614 branch 5 times, most recently from 7eec8d8 to b2687ba Compare June 17, 2016 10:15
@chalin chalin force-pushed the chalin-jade-util-get-example-name-0614 branch from b2687ba to e7a2c34 Compare June 26, 2016 19:16
@chalin
Copy link
Contributor Author

chalin commented Jun 28, 2016

Subsumed by #1686 (since this was a necessary change for toh-6).

@chalin chalin closed this Jun 28, 2016
@chalin chalin deleted the chalin-jade-util-get-example-name-0614 branch June 28, 2016 14:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants