markdown_helper 1.8.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -5
- data/CODE_OF_CONDUCT.md +74 -74
- data/Gemfile.lock +2 -1
- data/LICENSE.txt +21 -21
- data/README.md +60 -47
- data/Rakefile +16 -13
- data/bin/_include +0 -1
- data/bin/_resolve +0 -1
- data/bin/markdown_helper +3 -0
- data/bin/setup +8 -8
- data/lib/markdown_helper.rb +329 -97
- data/lib/markdown_helper/version.rb +1 -1
- data/markdown/{README.template.md → readme/README.template.md} +25 -12
- data/markdown/{code_block_ruby_template.md → readme/code_block_ruby_template.md} +0 -0
- data/markdown/{highlight_ruby_template.md → readme/highlight_ruby_template.md} +0 -0
- data/markdown/readme/highlighted_ruby.md +12 -0
- data/markdown/{include.md → readme/include.md} +0 -0
- data/markdown/{include.rb → readme/include.rb} +0 -0
- data/markdown/{include_usage.rb → readme/include_usage.rb} +0 -0
- data/markdown/{resolve.md → readme/resolve.md} +0 -0
- data/markdown/{resolve_usage.rb → readme/resolve_usage.rb} +0 -0
- data/markdown/{verbatim_ruby_template.md → readme/verbatim_ruby_template.md} +0 -0
- data/markdown/use_cases/Rakefile +53 -23
- data/markdown/use_cases/include/diagnose_circular_includes/diagnose_circular_includes.err +26 -0
- data/markdown/use_cases/include/diagnose_circular_includes/diagnose_circular_includes.rb +65 -0
- data/markdown/use_cases/include/diagnose_circular_includes/include.rb +5 -0
- data/markdown/use_cases/include/diagnose_circular_includes/includer.md +1 -0
- data/markdown/use_cases/include/diagnose_circular_includes/includer_0.md +1 -0
- data/markdown/use_cases/include/diagnose_circular_includes/includer_1.md +1 -0
- data/markdown/use_cases/include/diagnose_circular_includes/includer_2.md +1 -0
- data/markdown/use_cases/include/diagnose_circular_includes/use_case.md +98 -0
- data/markdown/use_cases/include/diagnose_circular_includes/use_case_template.md +27 -0
- data/markdown/use_cases/include/diagnose_missing_includee/diagnose_missing_includee.err +26 -0
- data/markdown/use_cases/include/diagnose_missing_includee/diagnose_missing_includee.rb +67 -0
- data/markdown/use_cases/include/diagnose_missing_includee/include.rb +5 -0
- data/markdown/use_cases/include/diagnose_missing_includee/included.md +1 -0
- data/markdown/use_cases/include/diagnose_missing_includee/includer.md +1 -0
- data/markdown/use_cases/include/diagnose_missing_includee/includer_0.md +1 -0
- data/markdown/use_cases/include/diagnose_missing_includee/includer_1.md +1 -0
- data/markdown/use_cases/include/diagnose_missing_includee/includer_2.md +1 -0
- data/markdown/use_cases/include/diagnose_missing_includee/use_case.md +100 -0
- data/markdown/use_cases/include/diagnose_missing_includee/use_case_template.md +29 -0
- data/markdown/use_cases/include/include.rb +5 -0
- data/markdown/use_cases/include/include_code_block/hello.rb +8 -0
- data/markdown/use_cases/include/include_code_block/include_code_block.rb +79 -0
- data/markdown/use_cases/include/include_code_block/included.md +14 -0
- data/markdown/use_cases/include/include_code_block/includer.md +4 -0
- data/markdown/use_cases/include/include_code_block/use_case.md +108 -0
- data/markdown/use_cases/include/include_code_block/use_case_template.md +33 -0
- data/markdown/use_cases/include/include_generated_text/include_generated_text.rb +38 -0
- data/markdown/use_cases/include/include_generated_text/use_case.md +18 -0
- data/markdown/use_cases/include/include_generated_text/use_case_template.md +18 -0
- data/markdown/use_cases/include/include_highlighted_code/hello.rb +8 -0
- data/markdown/use_cases/include/include_highlighted_code/include_highlighted_code.rb +83 -0
- data/markdown/use_cases/include/include_highlighted_code/included.md +14 -0
- data/markdown/use_cases/include/include_highlighted_code/includer.md +4 -0
- data/markdown/use_cases/include/include_highlighted_code/use_case.md +110 -0
- data/markdown/use_cases/include/include_highlighted_code/use_case_template.md +35 -0
- data/markdown/use_cases/include/include_markdown/include_markdown.rb +81 -0
- data/markdown/use_cases/include/include_markdown/included.md +13 -0
- data/markdown/use_cases/include/include_markdown/includer.md +4 -0
- data/markdown/use_cases/include/include_markdown/markdown.md +10 -0
- data/markdown/use_cases/include/include_markdown/use_case.md +106 -0
- data/markdown/use_cases/include/include_markdown/use_case_template.md +33 -0
- data/markdown/use_cases/include/include_use_case.rb +110 -0
- data/markdown/use_cases/include/include_with_added_comments/include_with_added_comments.rb +43 -60
- data/markdown/use_cases/include/include_with_added_comments/included.md +2 -2
- data/markdown/use_cases/include/include_with_added_comments/use_case.md +56 -0
- data/markdown/use_cases/include/include_with_added_comments/{template.md → use_case_template.md} +20 -1
- data/markdown/use_cases/include/interface.md +25 -0
- data/markdown/use_cases/include/nest_inclusions/included.md +5 -0
- data/markdown/use_cases/include/nest_inclusions/includee.md +3 -0
- data/markdown/use_cases/include/nest_inclusions/includer.md +3 -0
- data/markdown/use_cases/include/nest_inclusions/nest_inclusions.rb +61 -0
- data/markdown/use_cases/include/nest_inclusions/nested_includee.md +1 -0
- data/markdown/use_cases/include/nest_inclusions/use_case.md +74 -0
- data/markdown/use_cases/include/nest_inclusions/use_case_template.md +23 -0
- data/markdown/use_cases/include/reuse_text/include.rb +5 -0
- data/markdown/use_cases/include/reuse_text/included.md +2 -5
- data/markdown/use_cases/include/reuse_text/includee.md +1 -0
- data/markdown/use_cases/include/reuse_text/includer.md +2 -5
- data/markdown/use_cases/include/reuse_text/reuse_text.rb +24 -77
- data/markdown/use_cases/include/reuse_text/use_case.md +69 -0
- data/markdown/use_cases/include/reuse_text/use_case_template.md +23 -0
- data/markdown/use_cases/resolve/gemify_images/gemify_images.rb +58 -29
- data/markdown/use_cases/resolve/gemify_images/template.md +4 -0
- data/markdown/use_cases/use_case.rb +45 -0
- data/markdown/use_cases/use_cases.md +9 -2
- data/markdown_helper.gemspec +1 -1
- metadata +70 -19
- data/markdown/highlighted_ruby.md +0 -12
- data/markdown/use_cases/include/include_generated_text/build.rb +0 -46
- data/markdown/use_cases/include/include_with_added_comments/include_with_added_comments.md +0 -37
- data/markdown/use_cases/include/reuse_text/reusable_text.md +0 -1
- data/markdown/use_cases/include/reuse_text/reuse_text.md +0 -54
- data/markdown/use_cases/include/reuse_text/template.md +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8845145b2e85dd7e7420a4fd9c9c96d5795f01e
|
4
|
+
data.tar.gz: 088ef4f4cdb02275f43f2c99441f27f34e67e24d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa95f50a350189ee1caf1987dabc3b6ebd28f65ee6e5e1d53db52ab57102dfa0543212c8d81d6e5dce78c641cc6b50dc34193ab84cdc1b54468af411906fa0db
|
7
|
+
data.tar.gz: 72ccd0a952302199225dd553c1cd071f70790bd574a0ecfec5e887f771536225e418c93630483b6df92a98cb03db54a289ee1c1ad315c8511fad2346ecf12bac
|
data/.travis.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
sudo: false
|
2
|
-
language: ruby
|
3
|
-
rvm:
|
4
|
-
- 2.2.6
|
5
|
-
before_install: gem install bundler -v 1.16.1
|
1
|
+
sudo: false
|
2
|
+
language: ruby
|
3
|
+
rvm:
|
4
|
+
- 2.2.6
|
5
|
+
before_install: gem install bundler -v 1.16.1
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -1,74 +1,74 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at BurdetteLamar@Yahoo.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at BurdetteLamar@Yahoo.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile.lock
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2018 burdettelamar
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 burdettelamar
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
<!-- >>>>>> BEGIN GENERATED FILE (include): SOURCE
|
2
|
-
<!-- >>>>>> BEGIN GENERATED FILE (resolve): SOURCE
|
1
|
+
<!-- >>>>>> BEGIN GENERATED FILE (include): SOURCE temp_resolved.md -->
|
2
|
+
<!-- >>>>>> BEGIN GENERATED FILE (resolve): SOURCE README.template.md -->
|
3
3
|
# Markdown Helper
|
4
4
|
|
5
5
|
<!-- >>>>>> BEGIN RESOLVED IMAGES: INPUT-LINE '![Gem Version](https://badge.fury.io/rb/markdown_helper.svg) [Visit gem markdown_helper](https://rubygems.org/gems/markdown_helper)
|
@@ -10,12 +10,21 @@
|
|
10
10
|
|
11
11
|
## What's New?
|
12
12
|
|
13
|
-
|
13
|
+
* The helper now checks whether the working directory is in a ```git``` project, and raises an exception if not.
|
14
14
|
|
15
|
-
*
|
16
|
-
*
|
15
|
+
* There is now a backtrace of inclusions when:
|
16
|
+
* An includee file cannot be read.
|
17
|
+
* A circular inclusion (direct or indirect) is found.
|
18
|
+
* The backtrace shows:
|
19
|
+
* Each includer file path.
|
20
|
+
* Its include description.
|
21
|
+
* The includee file path.
|
22
|
+
* File paths are relative to the git directory.
|
23
|
+
* Use cases are added:
|
24
|
+
* [Diagnose Missing Includee](markdown/use_cases/include/diagnose_missing_includee/use_case.md#diagnose-missing-includee).
|
25
|
+
* [Diagnose Circular Includes](markdown/use_cases/include/diagnose_circular_includes/use_case.md#diagnose-circular-includes).
|
17
26
|
|
18
|
-
## What's
|
27
|
+
## What's a Markdown Helper?
|
19
28
|
|
20
29
|
Class <code>MarkdownHelper</code> supports:
|
21
30
|
|
@@ -29,6 +38,10 @@ The markdown helper is a preprocessor that reads a markdown document (template)
|
|
29
38
|
|
30
39
|
The template can contain certain instructions that call for file inclusions and image resolutions.
|
31
40
|
|
41
|
+
### Restriction: ```git``` Only
|
42
|
+
|
43
|
+
The helper works only in a ```git``` project: the working directory or one of ita parents must be a git directory -- one in which command ```git rev-parse --git-dir``` succeeds.
|
44
|
+
|
32
45
|
### Commented or Pristine?
|
33
46
|
|
34
47
|
By default, the output markdown has added comments that show:
|
@@ -41,10 +54,10 @@ You can suppress those comments using the <code>pristine</code> option.
|
|
41
54
|
|
42
55
|
## File Inclusion
|
43
56
|
|
44
|
-
<!-- >>>>>> BEGIN RESOLVED IMAGES: INPUT-LINE '![include_icon](
|
57
|
+
<!-- >>>>>> BEGIN RESOLVED IMAGES: INPUT-LINE '![include_icon](../../images/include.png | width=50)
|
45
58
|
' -->
|
46
59
|
<img src="https://raw.githubusercontent.com/BurdetteLamar/markdown_helper/master/images/include.png" alt="include_icon" width="50">
|
47
|
-
<!-- <<<<<< END RESOLVED IMAGES: INPUT-LINE '![include_icon](
|
60
|
+
<!-- <<<<<< END RESOLVED IMAGES: INPUT-LINE '![include_icon](../../images/include.png | width=50)
|
48
61
|
' -->
|
49
62
|
|
50
63
|
This markdown helper enables file inclusion in GitHub markdown.
|
@@ -57,8 +70,8 @@ Use the markdown helper to merge external files into a markdown (</code>.md</cod
|
|
57
70
|
|
58
71
|
#### Highlighted Code Block
|
59
72
|
|
60
|
-
<!-- >>>>>> BEGIN INCLUDED FILE (ruby): SOURCE markdown/include.rb -->
|
61
|
-
|
73
|
+
<!-- >>>>>> BEGIN INCLUDED FILE (ruby): SOURCE markdown/readme/include.rb -->
|
74
|
+
```include.rb```:
|
62
75
|
```ruby
|
63
76
|
class RubyCode
|
64
77
|
def initialize
|
@@ -66,12 +79,12 @@ class RubyCode
|
|
66
79
|
end
|
67
80
|
end
|
68
81
|
```
|
69
|
-
<!-- <<<<<< END INCLUDED FILE (ruby): SOURCE markdown/include.rb -->
|
82
|
+
<!-- <<<<<< END INCLUDED FILE (ruby): SOURCE markdown/readme/include.rb -->
|
70
83
|
|
71
84
|
#### Plain Code Block
|
72
85
|
|
73
|
-
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE markdown/include.rb -->
|
74
|
-
|
86
|
+
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE markdown/readme/include.rb -->
|
87
|
+
```include.rb```:
|
75
88
|
```
|
76
89
|
class RubyCode
|
77
90
|
def initialize
|
@@ -79,7 +92,7 @@ class RubyCode
|
|
79
92
|
end
|
80
93
|
end
|
81
94
|
```
|
82
|
-
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE markdown/include.rb -->
|
95
|
+
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE markdown/readme/include.rb -->
|
83
96
|
|
84
97
|
[Note: In the gem documentation, RubyDoc.info chooses to highlight this code block regardless. Go figure.]
|
85
98
|
|
@@ -97,8 +110,8 @@ The markdown text is itself scanned for nested includes.
|
|
97
110
|
|
98
111
|
#### CLI
|
99
112
|
|
100
|
-
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE
|
101
|
-
|
113
|
+
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE bin/usage/include.txt -->
|
114
|
+
```include.txt```:
|
102
115
|
```
|
103
116
|
|
104
117
|
Usage: markdown_helper include [options] template_file_path markdown_file_path
|
@@ -115,12 +128,12 @@ Usage: markdown_helper include [options] template_file_path markdown_file_path
|
|
115
128
|
* Both file types are .md.
|
116
129
|
* The template file contains file inclusion descriptions.
|
117
130
|
```
|
118
|
-
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE
|
131
|
+
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE bin/usage/include.txt -->
|
119
132
|
|
120
133
|
#### API
|
121
134
|
|
122
|
-
<!-- >>>>>> BEGIN INCLUDED FILE (ruby): SOURCE markdown/include_usage.rb -->
|
123
|
-
|
135
|
+
<!-- >>>>>> BEGIN INCLUDED FILE (ruby): SOURCE markdown/readme/include_usage.rb -->
|
136
|
+
```include_usage.rb```:
|
124
137
|
```ruby
|
125
138
|
require 'markdown_helper'
|
126
139
|
|
@@ -135,7 +148,7 @@ markdown_helper.include(template_file_path, markdown_file_path)
|
|
135
148
|
markdown_helper = MarkdownHelper.new(:pristine => true)
|
136
149
|
markdown_helper.include(template_file_path, markdown_file_path)
|
137
150
|
```
|
138
|
-
<!-- <<<<<< END INCLUDED FILE (ruby): SOURCE markdown/include_usage.rb -->
|
151
|
+
<!-- <<<<<< END INCLUDED FILE (ruby): SOURCE markdown/readme/include_usage.rb -->
|
139
152
|
|
140
153
|
#### Include Descriptions
|
141
154
|
|
@@ -153,8 +166,8 @@ where:
|
|
153
166
|
|
154
167
|
##### Example Include Descriptions
|
155
168
|
|
156
|
-
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE markdown/include.md -->
|
157
|
-
|
169
|
+
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE markdown/readme/include.md -->
|
170
|
+
```include.md```:
|
158
171
|
```code_block
|
159
172
|
@[ruby](my_ruby.rb)
|
160
173
|
|
@@ -162,14 +175,14 @@ where:
|
|
162
175
|
|
163
176
|
@[:markdown](my_markdown.md)
|
164
177
|
```
|
165
|
-
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE markdown/include.md -->
|
178
|
+
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE markdown/readme/include.md -->
|
166
179
|
|
167
180
|
## Image Path Resolution
|
168
181
|
|
169
|
-
<!-- >>>>>> BEGIN RESOLVED IMAGES: INPUT-LINE '![image_icon](
|
182
|
+
<!-- >>>>>> BEGIN RESOLVED IMAGES: INPUT-LINE '![image_icon](../../images/image.png | width=50)
|
170
183
|
' -->
|
171
184
|
<img src="https://raw.githubusercontent.com/BurdetteLamar/markdown_helper/master/images/image.png" alt="image_icon" width="50">
|
172
|
-
<!-- <<<<<< END RESOLVED IMAGES: INPUT-LINE '![image_icon](
|
185
|
+
<!-- <<<<<< END RESOLVED IMAGES: INPUT-LINE '![image_icon](../../images/image.png | width=50)
|
173
186
|
' -->
|
174
187
|
|
175
188
|
This markdown helper enables image path resolution in GitHub markdown.
|
@@ -184,8 +197,8 @@ This matters because when markdown becomes part of a Ruby gem, its images will h
|
|
184
197
|
|
185
198
|
#### CLI
|
186
199
|
|
187
|
-
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE
|
188
|
-
|
200
|
+
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE bin/usage/resolve.txt -->
|
201
|
+
```resolve.txt```:
|
189
202
|
```
|
190
203
|
|
191
204
|
Usage: markdown_helper resolve [options] template_file_path markdown_file_path
|
@@ -202,12 +215,12 @@ Usage: markdown_helper resolve [options] template_file_path markdown_file_path
|
|
202
215
|
* Both file types are .md.
|
203
216
|
* The template file contains image descriptions.
|
204
217
|
```
|
205
|
-
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE
|
218
|
+
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE bin/usage/resolve.txt -->
|
206
219
|
|
207
220
|
#### API
|
208
221
|
|
209
|
-
<!-- >>>>>> BEGIN INCLUDED FILE (ruby): SOURCE markdown/resolve_usage.rb -->
|
210
|
-
|
222
|
+
<!-- >>>>>> BEGIN INCLUDED FILE (ruby): SOURCE markdown/readme/resolve_usage.rb -->
|
223
|
+
```resolve_usage.rb```:
|
211
224
|
```ruby
|
212
225
|
require 'markdown_helper'
|
213
226
|
|
@@ -222,7 +235,7 @@ markdown_helper.resolve(template_file_path, markdown_file_path)
|
|
222
235
|
markdown_helper = MarkdownHelper.new(:pristine => true)
|
223
236
|
markdown_helper.resolve(template_file_path, markdown_file_path)
|
224
237
|
```
|
225
|
-
<!-- <<<<<< END INCLUDED FILE (ruby): SOURCE markdown/resolve_usage.rb -->
|
238
|
+
<!-- <<<<<< END INCLUDED FILE (ruby): SOURCE markdown/readme/resolve_usage.rb -->
|
226
239
|
|
227
240
|
#### Image Descriptions
|
228
241
|
|
@@ -238,8 +251,8 @@ where:
|
|
238
251
|
|
239
252
|
##### Example Image Descriptions
|
240
253
|
|
241
|
-
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE markdown/resolve.md -->
|
242
|
-
|
254
|
+
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE markdown/readme/resolve.md -->
|
255
|
+
```resolve.md```:
|
243
256
|
```code_block
|
244
257
|
![my_alt](image/image.png)
|
245
258
|
|
@@ -247,14 +260,14 @@ where:
|
|
247
260
|
|
248
261
|
![my_alt](image/image.png| width=50 height=50)
|
249
262
|
```
|
250
|
-
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE markdown/resolve.md -->
|
263
|
+
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE markdown/readme/resolve.md -->
|
251
264
|
|
252
265
|
## Image Attributes
|
253
266
|
|
254
|
-
<!-- >>>>>> BEGIN RESOLVED IMAGES: INPUT-LINE '![html_icon](
|
267
|
+
<!-- >>>>>> BEGIN RESOLVED IMAGES: INPUT-LINE '![html_icon](../../images/html.png | width=50)
|
255
268
|
' -->
|
256
269
|
<img src="https://raw.githubusercontent.com/BurdetteLamar/markdown_helper/master/images/html.png" alt="html_icon" width="50">
|
257
|
-
<!-- <<<<<< END RESOLVED IMAGES: INPUT-LINE '![html_icon](
|
270
|
+
<!-- <<<<<< END RESOLVED IMAGES: INPUT-LINE '![html_icon](../../images/html.png | width=50)
|
258
271
|
' -->
|
259
272
|
|
260
273
|
This markdown helper enables HTML image attributes in GitHub markdown [image descriptions](https://github.github.com/gfm/#image-description).
|
@@ -267,8 +280,8 @@ Use the markdown helper to add image attributes in a markdown (</code>.md</code>
|
|
267
280
|
|
268
281
|
#### CLI
|
269
282
|
|
270
|
-
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE
|
271
|
-
|
283
|
+
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE bin/usage/resolve.txt -->
|
284
|
+
```resolve.txt```:
|
272
285
|
```
|
273
286
|
|
274
287
|
Usage: markdown_helper resolve [options] template_file_path markdown_file_path
|
@@ -285,12 +298,12 @@ Usage: markdown_helper resolve [options] template_file_path markdown_file_path
|
|
285
298
|
* Both file types are .md.
|
286
299
|
* The template file contains image descriptions.
|
287
300
|
```
|
288
|
-
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE
|
301
|
+
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE bin/usage/resolve.txt -->
|
289
302
|
|
290
303
|
#### API
|
291
304
|
|
292
|
-
<!-- >>>>>> BEGIN INCLUDED FILE (ruby): SOURCE markdown/resolve_usage.rb -->
|
293
|
-
|
305
|
+
<!-- >>>>>> BEGIN INCLUDED FILE (ruby): SOURCE markdown/readme/resolve_usage.rb -->
|
306
|
+
```resolve_usage.rb```:
|
294
307
|
```ruby
|
295
308
|
require 'markdown_helper'
|
296
309
|
|
@@ -305,7 +318,7 @@ markdown_helper.resolve(template_file_path, markdown_file_path)
|
|
305
318
|
markdown_helper = MarkdownHelper.new(:pristine => true)
|
306
319
|
markdown_helper.resolve(template_file_path, markdown_file_path)
|
307
320
|
```
|
308
|
-
<!-- <<<<<< END INCLUDED FILE (ruby): SOURCE markdown/resolve_usage.rb -->
|
321
|
+
<!-- <<<<<< END INCLUDED FILE (ruby): SOURCE markdown/readme/resolve_usage.rb -->
|
309
322
|
|
310
323
|
#### Image Descriptions
|
311
324
|
|
@@ -321,8 +334,8 @@ where:
|
|
321
334
|
|
322
335
|
##### Example Image Descriptions
|
323
336
|
|
324
|
-
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE markdown/resolve.md -->
|
325
|
-
|
337
|
+
<!-- >>>>>> BEGIN INCLUDED FILE (code_block): SOURCE markdown/readme/resolve.md -->
|
338
|
+
```resolve.md```:
|
326
339
|
```code_block
|
327
340
|
![my_alt](image/image.png)
|
328
341
|
|
@@ -330,7 +343,7 @@ where:
|
|
330
343
|
|
331
344
|
![my_alt](image/image.png| width=50 height=50)
|
332
345
|
```
|
333
|
-
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE markdown/resolve.md -->
|
346
|
+
<!-- <<<<<< END INCLUDED FILE (code_block): SOURCE markdown/readme/resolve.md -->
|
334
347
|
|
335
348
|
## What Should Be Next?
|
336
349
|
|
@@ -343,5 +356,5 @@ I have opened some enhancement Issues in the GitHub [markdown_helper](https://gi
|
|
343
356
|
* [Pagination](https://github.com/BurdetteLamar/markdown_helper/issues/40): series of markdown pages connected by prev/next navigation links.
|
344
357
|
|
345
358
|
Feel free to comment on any of these, or to add more Issues (enhancement or otherwise).
|
346
|
-
<!-- <<<<<< END GENERATED FILE (resolve): SOURCE
|
347
|
-
<!-- <<<<<< END GENERATED FILE (include): SOURCE
|
359
|
+
<!-- <<<<<< END GENERATED FILE (resolve): SOURCE README.template.md -->
|
360
|
+
<!-- <<<<<< END GENERATED FILE (include): SOURCE temp_resolved.md -->
|