Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
60ea06a6
Commit
60ea06a6
authored
Jan 26, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 722711 - [PATCH] Link refs with no title swallow an extra newline
parent
0e9da9fb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
3 deletions
+39
-3
markdown.cpp
src/markdown.cpp
+3
-3
md_055_markdown.xml
testing/055/md_055_markdown.xml
+20
-0
055_markdown.md
testing/055_markdown.md
+16
-0
No files found.
src/markdown.cpp
View file @
60ea06a6
...
@@ -1133,8 +1133,8 @@ static int isLinkRef(const char *data,int size,
...
@@ -1133,8 +1133,8 @@ static int isLinkRef(const char *data,int size,
while
(
i
<
size
&&
data
[
i
]
==
' '
)
i
++
;
while
(
i
<
size
&&
data
[
i
]
==
' '
)
i
++
;
if
(
i
<
size
&&
data
[
i
]
==
'\n'
)
if
(
i
<
size
&&
data
[
i
]
==
'\n'
)
{
{
i
++
;
eol
=
i
;
eol
=
i
;
i
++
;
while
(
i
<
size
&&
data
[
i
]
==
' '
)
i
++
;
while
(
i
<
size
&&
data
[
i
]
==
' '
)
i
++
;
}
}
if
(
i
>=
size
)
if
(
i
>=
size
)
...
@@ -1152,6 +1152,7 @@ static int isLinkRef(const char *data,int size,
...
@@ -1152,6 +1152,7 @@ static int isLinkRef(const char *data,int size,
int
titleStart
=
i
;
int
titleStart
=
i
;
// search for end of the line
// search for end of the line
while
(
i
<
size
&&
data
[
i
]
!=
'\n'
)
i
++
;
while
(
i
<
size
&&
data
[
i
]
!=
'\n'
)
i
++
;
eol
=
i
;
// search back to matching character
// search back to matching character
int
end
=
i
-
1
;
int
end
=
i
-
1
;
...
@@ -1166,8 +1167,7 @@ static int isLinkRef(const char *data,int size,
...
@@ -1166,8 +1167,7 @@ static int isLinkRef(const char *data,int size,
//printf("end of isLinkRef: i=%d size=%d data[i]='%c' eol=%d\n",
//printf("end of isLinkRef: i=%d size=%d data[i]='%c' eol=%d\n",
// i,size,data[i],eol);
// i,size,data[i],eol);
if
(
i
>=
size
)
return
i
;
// end of buffer while ref id was found
if
(
i
>=
size
)
return
i
;
// end of buffer while ref id was found
else
if
(
data
[
i
]
==
'\n'
)
return
i
+
1
;
// end of line while ref id was found
else
if
(
eol
)
return
eol
;
// end of line while ref id was found
else
if
(
eol
)
return
eol
;
// no optional title found
return
0
;
// invalid link ref
return
0
;
// invalid link ref
}
}
...
...
testing/055/md_055_markdown.xml
0 → 100644
View file @
60ea06a6
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"compound.xsd"
version=
""
>
<compounddef
id=
"md_055_markdown"
kind=
"page"
>
<compoundname>
md_055_markdown
</compoundname>
<title>
055_markdown
</title>
<detaileddescription>
<para>
<heading
level=
"1"
>
Foo
</heading>
</para>
<para>
<heading
level=
"2"
>
Bar
</heading>
</para>
<para>
Some text with a
<ulink
url=
"http://www.example.com/"
>
link
</ulink>
.
</para>
<para>
<heading
level=
"2"
>
Baz
</heading>
</para>
<para>
More text
</para>
</detaileddescription>
</compounddef>
</doxygen>
testing/055_markdown.md
0 → 100644
View file @
60ea06a6
<!--
// objective: test markdown
// check: md_055_markdown.xml
-->
# Foo
## Bar
Some text with a
[
link
][
1
]
.
[
1
]:
http://www.example.com/
## Baz
More text
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