Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
198c1200
Commit
198c1200
authored
Feb 26, 2016
by
Tim St. Clair
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect & fix backwards markdown links (of the form (foo)[bar])
parent
8c60068b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
README.md
cluster/cloudimages/README.md
+3
-3
links.go
cmd/mungedocs/links.go
+11
-1
README.md
examples/spark/README.md
+1
-1
No files found.
cluster/cloudimages/README.md
View file @
198c1200
...
@@ -24,15 +24,15 @@ Advantages of a harmonized image:
...
@@ -24,15 +24,15 @@ Advantages of a harmonized image:
## bootstrap-vz
## bootstrap-vz
Currently images are built using
Currently images are built using
(bootstrap-vz)
[
https://github.com/andsens/bootstrap-vz
]
, because this is
[
bootstrap-vz
](
https://github.com/andsens/bootstrap-vz
)
, because this is
default builder for the official Debian images, and because it supports
default builder for the official Debian images, and because it supports
multiple clouds including AWS, Azure & GCE. It also supports KVM, which should
multiple clouds including AWS, Azure & GCE. It also supports KVM, which should
support OpenStack.
support OpenStack.
## Building an image
## Building an image
A go program/script to build images in
(in
A go program/script to build images in
progress)
[
https://github.com/kubernetes/contrib/pull/486
]
, in the contrib
[
in progress
](
https://github.com/kubernetes/contrib/pull/486
)
, in the contrib
project.
project.
...
...
cmd/mungedocs/links.go
View file @
198c1200
...
@@ -29,6 +29,8 @@ import (
...
@@ -29,6 +29,8 @@ import (
var
(
var
(
// Finds markdown links of the form [foo](bar "alt-text").
// Finds markdown links of the form [foo](bar "alt-text").
linkRE
=
regexp
.
MustCompile
(
`\[([^]]*)\]\(([^)]*)\)`
)
linkRE
=
regexp
.
MustCompile
(
`\[([^]]*)\]\(([^)]*)\)`
)
// Finds markdown link typos of the form (foo)[bar]
badLinkRE
=
regexp
.
MustCompile
(
`\([^]()]*\)\[[^]()]*\]`
)
// Splits the link target into link target and alt-text.
// Splits the link target into link target and alt-text.
altTextRE
=
regexp
.
MustCompile
(
`([^)]*)( ".*")`
)
altTextRE
=
regexp
.
MustCompile
(
`([^)]*)( ".*")`
)
)
)
...
@@ -125,7 +127,15 @@ func updateLinks(filePath string, mlines mungeLines) (mungeLines, error) {
...
@@ -125,7 +127,15 @@ func updateLinks(filePath string, mlines mungeLines) (mungeLines, error) {
allErrs
:=
[]
string
{}
allErrs
:=
[]
string
{}
for
lineNum
,
mline
:=
range
mlines
{
for
lineNum
,
mline
:=
range
mlines
{
if
mline
.
preformatted
||
!
mline
.
link
{
if
mline
.
preformatted
{
out
=
append
(
out
,
mline
)
continue
}
if
badMatch
:=
badLinkRE
.
FindString
(
mline
.
data
);
badMatch
!=
""
{
allErrs
=
append
(
allErrs
,
fmt
.
Sprintf
(
"On line %d: found backwards markdown link %q"
,
lineNum
,
badMatch
))
}
if
!
mline
.
link
{
out
=
append
(
out
,
mline
)
out
=
append
(
out
,
mline
)
continue
continue
}
}
...
...
examples/spark/README.md
View file @
198c1200
...
@@ -237,7 +237,7 @@ $ kubectl port-forward zeppelin-controller-ja09s 8080:8080
...
@@ -237,7 +237,7 @@ $ kubectl port-forward zeppelin-controller-ja09s 8080:8080
```
```
This forwards
`localhost`
8080 to container port 8080. You can then find
This forwards
`localhost`
8080 to container port 8080. You can then find
Zeppelin at
(https://localhost:8080/)
[
https://localhost:8080/
]
.
Zeppelin at
[
https://localhost:8080/
](
https://localhost:8080/
)
.
Create a "New Notebook". In there, type:
Create a "New Notebook". In there, type:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment