addint backticks for inline code parsing
This commit is contained in:
parent
a4d03c8e8d
commit
86042d597c
@ -45,6 +45,14 @@ function replaceInline(line, result, start, end) {
|
|||||||
# Build the result: before match, <em>, content, </em>, after match
|
# Build the result: before match, <em>, content, </em>, after match
|
||||||
line = substr(line, 1, start-1) "<em>" substr(line, start+1, RLENGTH-2) "</em>" substr(line, end+1)
|
line = substr(line, 1, start-1) "<em>" substr(line, start+1, RLENGTH-2) "</em>" substr(line, end+1)
|
||||||
}
|
}
|
||||||
|
# Replace occurrences of `...` with <code>...</code>
|
||||||
|
while (match(line, /`([^`]+)`/)) {
|
||||||
|
|
||||||
|
start = RSTART
|
||||||
|
end = RSTART + RLENGTH - 1
|
||||||
|
# Build the result: before match, <em>, content, </em>, after match
|
||||||
|
line = substr(line, 1, start-1) "<code>" substr(line, start+1, RLENGTH-2) "</code>" substr(line, end+1)
|
||||||
|
}
|
||||||
|
|
||||||
# Replace occurances of [link](url) with <a href="url">link</<a>
|
# Replace occurances of [link](url) with <a href="url">link</<a>
|
||||||
while (match(line, /\[([^\]]+)\]\([^\)]+\)/)) {
|
while (match(line, /\[([^\]]+)\]\([^\)]+\)/)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user