-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
330 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "Franklin" | ||
uuid = "713c75ef-9fc9-4b05-94a9-213340da978e" | ||
authors = ["Thibaut Lienart <[email protected]>"] | ||
version = "0.6.8" | ||
version = "0.6.9" | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
[deps] | ||
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#= ===================================================== | ||
LINK patterns, see html link fixer | ||
===================================================== =# | ||
# here we're looking for [id] or [id][] or [stuff][id] or ![stuff][id] but not [id]: | ||
# 1 > (!)? == either ! or nothing | ||
# 2 > [(.*?)] == [...] inside of the brackets | ||
# 3 > (?:[(.*?)])? == [...] inside of second brackets if there is such | ||
const ESC_LINK_PAT = r"(!)?[(.*?)](?!:)(?:[(.*?)])?" | ||
|
||
#= ===================================================== | ||
HBLOCK patterns, see html blocks | ||
NOTE: the for block needs verification (matching parens) | ||
===================================================== =# | ||
|
||
const HBLOCK_IF_PAT = r"{{\s*if\s+([a-zA-Z_]\S*)\s*}}" | ||
const HBLOCK_ELSE_PAT = r"{{\s*else\s*}}" | ||
const HBLOCK_ELSEIF_PAT = r"{{\s*else\s*if\s+([a-zA-Z_]\S*)\s*}}" | ||
const HBLOCK_END_PAT = r"{{\s*end\s*}}" | ||
|
||
const HBLOCK_ISDEF_PAT = r"{{\s*i(?:s|f)def\s+([a-zA-Z_]\S*)\s*}}" | ||
const HBLOCK_ISNOTDEF_PAT = r"{{\s*i(?:s|f)n(?:ot)?def\s+([a-zA-Z_]\S*)\s*}}" | ||
const HBLOCK_ISPAGE_PAT = r"{{\s*ispage\s+((.|\n)+?)}}" | ||
const HBLOCK_ISNOTPAGE_PAT = r"{{\s*isnotpage\s+((.|\n)+?)}}" | ||
|
||
const HBLOCK_FOR_PAT = r"{{\s*for\s+(\(?(?:\s*[a-zA-Z_][^\r\n\t\f\v,]*,\s*)*[a-zA-Z_]\S*\s*\)?)\s+in\s+([a-zA-Z_]\S*)\s*}}" | ||
|
||
const HBLOCK_TOC_PAT = r"{{\s*toc\s*}}" | ||
|
||
#= ===================================================== | ||
Pattern checkers | ||
===================================================== =# | ||
|
||
""" | ||
check_for_pat(v) | ||
Check that we have something like `{{for v in iterate}}` or | ||
`{for (v1,v2) in iterate}}` but not something with unmached parens. | ||
""" | ||
function check_for_pat(v) | ||
op = startswith(v, "(") | ||
cp = endswith(v, ")") | ||
xor(op, cp) && | ||
throw(HTMLBlockError("Unbalanced expression in {{for ...}}")) | ||
!op && occursin(",", v) && | ||
throw(HTMLBlockError("Missing parens in {{for ...}}")) | ||
return nothing | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
1 comment
on commit 1caa099
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/11191
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:
git tag -a v0.6.9 -m "<description of version>" 1caa0993220593568265c3483656aa3e96e38d1d
git push origin v0.6.9
@JuliaRegistrator register