Skip to content

Commit

Permalink
Globloc (#227)
Browse files Browse the repository at this point in the history
* fixes to headers and toc and internal links

* fixes for JDINSERT followed by line return

* fixes for plain code blocks

* fixed a problem with overlapping defs global and local; global must take precedence
  • Loading branch information
tlienart authored Sep 21, 2019
1 parent 52235b9 commit d19522f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/jd_vars.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ is processed.
LOCAL_PAGE_VARS["jd_rpath"] = Pair("", (String,)) # local path to file src/[...]/blah.md
LOCAL_PAGE_VARS["lang"] = Pair("julia", (String,)) # default lang for indented code
LOCAL_PAGE_VARS["reflinks"] = Pair(true, (Bool,)) # whether there are reflinks or not

# If there are GLOBAL vars that are defined, they take precedence
local_keys = keys(LOCAL_PAGE_VARS)
for k in keys(GLOBAL_PAGE_VARS)
k in local_keys || continue
LOCAL_PAGE_VARS[k] = GLOBAL_PAGE_VARS[k]
end
return nothing
end

Expand Down
3 changes: 2 additions & 1 deletion src/manager/judoc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ function jd_fullpass(watched_files::NamedTuple; clear::Bool=false, verb::Bool=fa
# reinsert prepath if specified
isnothing(prepath) || (GLOBAL_PAGE_VARS["prepath"] = prepath)

# process configuration file
# process configuration file (see also `process_md_defs`)
process_config()


# looking for an index file to process
indexmd = PATHS[:src] => "index.md"
indexhtml = PATHS[:src] => "index.html"
Expand Down

0 comments on commit d19522f

Please sign in to comment.