markdown_link_checker_sc 0.0.13 → 0.0.116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -12
- package/biglog.txt +0 -0
- package/index.js +181 -435
- package/package.json +6 -1
- package/src/errors.js +148 -0
- package/src/helpers.js +41 -0
- package/src/links.js +194 -0
- package/src/output_errors.js +49 -0
- package/src/process_image_orphans.js +97 -0
- package/src/process_internal_url_links.js +20 -0
- package/src/process_local_image_links.js +57 -0
- package/src/process_markdown.js +400 -0
- package/src/process_orphans.js +145 -0
- package/src/process_relative_links.js +116 -0
- package/src/shared_data.js +2 -0
- package/src/slugify.js +17 -0
- package/tests/errortype/current_file_missing_anchor/heading_present_for_anchor.md +13 -0
- package/tests/errortype/current_file_missing_anchor/missing_heading.md +5 -0
- package/tests/errortype/linked_file_missing_anchor/file_with_broken_heading_link.md +10 -0
- package/tests/errortype/linked_file_missing_anchor/file_without_heading.md +10 -0
- package/tests/errortype/linked_internal_file_html/file_exists.html +5 -0
- package/tests/errortype/linked_internal_file_html/file_exists_as_markdown.md +6 -0
- package/tests/errortype/linked_internal_file_html/links_to_file_that_is_html.md +10 -0
- package/tests/errortype/linked_internal_file_missing/file_present_relative_link_no_error.md +5 -0
- package/tests/errortype/linked_internal_file_missing/file_present_should_be_no_error.md +5 -0
- package/tests/errortype/linked_internal_file_missing/links_to_file_that_is_not_present.md +8 -0
- package/tests/errortype/local_image_not_found/page_with_missing_image.md +9 -0
- package/tests/errortype/local_image_not_found/test.png +0 -0
- package/tests/errortype/orphan_images/assets/image1_not_linked.png +0 -0
- package/tests/errortype/orphan_images/assets/image2_not_linked.png +0 -0
- package/tests/errortype/orphan_images/test/image3_not_linked.png +0 -0
- package/tests/errortype/orphan_images/test/image4_linked.png +0 -0
- package/tests/errortype/orphan_images/test/intro.md +11 -0
- package/tests/errortype/page_not_in_toc/page1intoc_should_not_error.md +7 -0
- package/tests/errortype/page_not_in_toc/page2intoc_should_not_error.md +7 -0
- package/tests/errortype/page_not_in_toc/page3NOTinTOC.md +7 -0
- package/tests/errortype/page_not_in_toc/toc.md +9 -0
- package/tests/errortype/url_to_local_site/mylocalsite_dot_com.md +8 -0
- package/tests/links/tests1.md +93 -0
- package/tests/links/tests2.md +3 -0
- package/tests/tests1.md +0 -42
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Tests if error shows when linked file has no matching heading
|
|
2
|
+
|
|
3
|
+
Run like: `node .\index.js -d tests/errortype/linked_file_missing_anchor`
|
|
4
|
+
|
|
5
|
+
- [Url to file exists but no matching "heading to match"](file_without_heading.md#heading-to-match-that_doesnt_exist) yeah!
|
|
6
|
+
|
|
7
|
+
- [Matched heading for anchor exists: should not show error](file_without_heading.md#cool-matched-heading-for-anchor-link)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
- Link to id?
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Tests if error shows when linked file has no matching heading
|
|
2
|
+
|
|
3
|
+
Run like: `node .\index.js -d tests/errortype/linked_internal_file_html`
|
|
4
|
+
|
|
5
|
+
- [Url to HTML file that exists - but has no matching heading (we probably don't do anchors in HTML yet)](file_exists.html#heading-to-match) yeah!
|
|
6
|
+
|
|
7
|
+
- [Url to HTML file that does not exists - show missing file error](file_not_exists.html#heading-to-match) yeah!
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
- [Url to HTML file that does not exists but markdown does - show appropriate error](file_exists_as_markdown.html#heading-to-match) yeah!
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Tests if error shows when linked file has no matching heading
|
|
2
|
+
|
|
3
|
+
Run like: `node .\index.js -d tests/errortype/linked_internal_file_missing`
|
|
4
|
+
|
|
5
|
+
- [Url to missing file - show missing file error](file_no_exists.md#heading-to-match)
|
|
6
|
+
- [Url to present file in same directory - should be no error](file_present_should_be_no_error.md)
|
|
7
|
+
- [Url to present file linked relative - should be no error](../linked_internal_file_missing/file_present_relative_link_no_error.md)
|
|
8
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Tests if linked images not in file system show up as errors
|
|
2
|
+
|
|
3
|
+
Run like: `node .\index.js -d tests/errortype/local_image_not_found`
|
|
4
|
+
|
|
5
|
+
This has links to images that exist/don't exist in file system
|
|
6
|
+
|
|
7
|
+
- 
|
|
8
|
+
- 
|
|
9
|
+
- 
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Tests if missing page in toc throws error (test page is in toc)
|
|
2
|
+
|
|
3
|
+
Run like:
|
|
4
|
+
- `node .\index.js -d tests/errortype/orphan_images/test`
|
|
5
|
+
- should just pick up "\test\image3_not_linked.png"
|
|
6
|
+
- `node .\index.js -d tests/errortype/orphan_images/test -i tests/errortype/orphan_images/assets`
|
|
7
|
+
- should pick up "\test\image3_not_linked.png", \assets\image1_not_linked.png, \assets\image2_not_linked.png
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
- 
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Tests if a url to current site shows up as error
|
|
2
|
+
|
|
3
|
+
Run like: `node .\index.js -d tests/errortype/page_not_in_toc`
|
|
4
|
+
|
|
5
|
+
This is the TOC file. Links to two others. Those should not error
|
|
6
|
+
|
|
7
|
+
- [Page in TOC1](page1intoc_should_not_error.md)
|
|
8
|
+
- [Page in TOC2](page2intoc_should_not_error.md)
|
|
9
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Tests if a url to current site shows up as error
|
|
2
|
+
|
|
3
|
+
Run like: `node .\index.js -d tests/errortype/url_to_local_site -u mylocalsite.com`
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
This is URL to local site: [Url to local site in markdown](http://mylocalsite.com/somepage.md) space.
|
|
7
|
+
|
|
8
|
+
This is HTML URL to local site: <a href="http://mylocalsite.com/somepage.md">Url to local site as a tag</a> whatever.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Heading One
|
|
2
|
+
|
|
3
|
+
[beer1](https://www.example.com/path/to/page.html?param1=value1#anchor1)
|
|
4
|
+
|
|
5
|
+
[beer2](https://www.example.com/path/to/page.html#anchor2?param1=value1)
|
|
6
|
+
|
|
7
|
+
[beer3](#anchor3?param1=value1)
|
|
8
|
+
|
|
9
|
+
[beer4](car.md#anchor4?param1=value1)
|
|
10
|
+
|
|
11
|
+
[beer5](../fred/car.md#anchor5?param1=value1)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
[beer6](../fred/car.md#anchor5?param1=value1¶m2=value2)
|
|
15
|
+
|
|
16
|
+
## Heading Two
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## Image tests
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<img src="../../assets/qgc/setup/sensor/sensor_orientation_set_orientations.jpg" style="width: 600px;"/>
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
## Heading Two 1
|
|
29
|
+
|
|
30
|
+
## Heading Two 2
|
|
31
|
+
|
|
32
|
+
This link not handled well
|
|
33
|
+
|
|
34
|
+
<a href="http://www.craftandtheoryllc.com/telemetry-cable"><img src="../../assets/hardware/telemetry/craft_and_theory_frsky_telemetry_cables.jpg" alt="Purchase cable here from Craft and Theory"></a>
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Heading Three
|
|
38
|
+
|
|
39
|
+
#### Heading Four
|
|
40
|
+
|
|
41
|
+
##### Heading Five
|
|
42
|
+
|
|
43
|
+
###### Heading Six
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## Odd Named-+And*Chars`WorkedOUTER#~END
|
|
47
|
+
|
|
48
|
+
[Link Start Line](#heading-two-2) is a great one
|
|
49
|
+
|
|
50
|
+
A link in a line [Link inside a line](#anchor-to_this-page-inside_line) that is cool
|
|
51
|
+
|
|
52
|
+
A link enbd line [Link end line](#anchor-to_this-page-end-line)
|
|
53
|
+
|
|
54
|
+
[Link start line](#anchor-to_this-page-start-line) blah blah
|
|
55
|
+
|
|
56
|
+
Two links in line line [Link 1 or 2 in Line](#anchor--lin1-inlinkto_this-page-end-line) and [Link 2 In Line Line two](#anchor-link2-inlin=to_this-page-end-line2) fred
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<a href="someurl1" title="some title1">somelink text1</a>
|
|
60
|
+
|
|
61
|
+
<a href="someurl2">somelink text2</a>
|
|
62
|
+
|
|
63
|
+
<a title="some title 3" href="some url3" >somelink text3</a>
|
|
64
|
+
|
|
65
|
+
dfsafd 
|
|
66
|
+
|
|
67
|
+
dfsafd 
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
aa 
|
|
71
|
+
|
|
72
|
+
dfsafd @[vuepressYoutueUrl text](vuepressYoutueUrl)
|
|
73
|
+
|
|
74
|
+
Image in link [](../image_in_link_linkurl.md)
|
|
75
|
+
|
|
76
|
+
'Here is an [example of an ](https://example.com) around a link.'
|
|
77
|
+
|
|
78
|
+
'This is a [link](https://example.com) and this is an  and this is a [](https://example.com)';
|
|
79
|
+
|
|
80
|
+
'This a [text in link1  more text in link1](https://example1.com)) and another one [text in link2  more text in link2](https://example2.com) blah blah). Cabbage.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
A [first test params](https://example.com/path/to/resource?param1=value1¶m2=value2#anchor)
|
|
84
|
+
|
|
85
|
+
A [first test params](https://example.com/path/to/resource#secondanchor?paramd1=value1¶m2=value2)
|
|
86
|
+
|
|
87
|
+
asfd [CBRK_VTOLARMING](../advanced_config/parameter_reference.md#CBRK_VTOLARMING) dfadf
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
[Internal link to missing heading in test2](test2.md#some-unikely-heading)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
[Internal link to an html file](ffred.htm;#some-unikely-heading)
|
package/tests/tests1.md
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# Heading One
|
|
2
|
-
|
|
3
|
-
## Heading Two
|
|
4
|
-
|
|
5
|
-
## Heading Two
|
|
6
|
-
|
|
7
|
-
## Heading Two 1
|
|
8
|
-
|
|
9
|
-
## Heading Two 2
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
### Heading Three
|
|
13
|
-
|
|
14
|
-
#### Heading Four
|
|
15
|
-
|
|
16
|
-
##### Heading Five
|
|
17
|
-
|
|
18
|
-
###### Heading Six
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## Odd Named-+And*Chars`WorkedOUTER#~END
|
|
22
|
-
|
|
23
|
-
[Link Start Line](#heading-two-2) is a great one
|
|
24
|
-
|
|
25
|
-
A link in aline [Link In Line Line](#heading-two-2) that is cool
|
|
26
|
-
|
|
27
|
-
A link enbd line [Link In Line Line](#heading-two-2)
|
|
28
|
-
|
|
29
|
-
A link enbd line [Link 1 In Line Line](#heading-two-2) and [Link 2 In Line Line two](#heading-two-2) fred
|
|
30
|
-
|
|
31
|
-

|
|
32
|
-
|
|
33
|
-
dfsafd 
|
|
34
|
-
90odsf
|
|
35
|
-
|
|
36
|
-
Image in link [](#heading-two-2)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
PX4 supports numerous types of vehicles, including different configurations of multicopters, planes, VTOL vehicles, ground vehicles, etc. The complete set of supported configurations can be seen in the [Airframes Reference](../airframes/airframe_reference.md).
|
|
41
|
-
|
|
42
|
-
This section contains instructions for how to install several different [flight controllers](../flight_controller/README.md) on a number of common frames.
|