Giter Club home page Giter Club logo

Comments (7)

tlienart avatar tlienart commented on July 18, 2024 3

awesome thanks! if @yangcht you could also give a shot to #1062 and confirm it fixes your issue, then we're good to go and I'll get that 🚢 asap 😄

from franklin.jl.

mossr avatar mossr commented on July 18, 2024 2

Hey, sorry about that 🙃

I've pushed a fix that simplifies the TOC code with an added test of a more complicated TOC example.

@ziotom78 your TOC now works as expected:
image

from franklin.jl.

yangcht avatar yangcht commented on July 18, 2024 2

Hi @tlienart, I just did a test with #1062 and it works.

from franklin.jl.

ziotom78 avatar ziotom78 commented on July 18, 2024

Hi @mossr, I have been using the \toc function. It is fantastic. However, since the last update, it has stopped working and giving me errors like the following. Do you have any idea how to fix it?

I get the same error using Franklin.jl 0.10.94 and Julia 1.9.1, but the line numbers are slightly different:

julia> using Franklin

julia> serve()
  Activating project at `~/Documents/corsi/laboratorio_calcolo/tnds-notebooks`
→ Initial full pass...
┌ Franklin Warning: in <lezione10.md>
│ Encountered an issue processing 'lezione10.md' in lcolo/tnds-notebooks.
│ Verify, then re-start the Franklin server.
│ The error is displayed below:
│ ArgumentError("invalid Array dimensions")
└
ERROR: ArgumentError: invalid Array dimensions
Stacktrace:
  [1] Array
    @ ./boot.jl:477 [inlined]
  [2] Array
    @ ./boot.jl:486 [inlined]
  [3] fill
    @ ./array.jl:532 [inlined]
  [4] fill(v::Nothing, dims::Int64)
    @ Base ./array.jl:530
  [5] hfun_toc(params::Vector{String})
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/converter/html/functions.jl:244
  [6] top-level scope
    @ none:1
  [7] eval
    @ ./boot.jl:370 [inlined]
  [8] eval
    @ ~/.julia/packages/Franklin/UskEZ/src/Franklin.jl:1 [inlined]
  [9] convert_html_fblock(β::Franklin.HFun)
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/converter/html/functions.jl:18
 [10] process_html_qblocks(hs::String, qblocks::Vector{Franklin.AbstractBlock}, head::Int64, tail::Int64)
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/converter/html/html.jl:122
 [11] process_html_qblocks(hs::String, qblocks::Vector{Franklin.AbstractBlock})
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/converter/html/html.jl:102
 [12] convert_html(hs::String)
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/converter/html/html.jl:22
 [13] map
    @ ./tuple.jl:275 [inlined]
 [14] map
    @ ./tuple.jl:276 [inlined]
 [15] write_page(output_path::String, content::String; head::String, pgfoot::String, foot::String)
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/manager/write_page.jl:108
 [16] write_page
    @ ~/.julia/packages/Franklin/UskEZ/src/manager/write_page.jl:75 [inlined]
 [17] convert_and_write(root::String, file::String, head::String, pgfoot::String, foot::String, output_path::String)
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/manager/write_page.jl:215
 [18] process_file_err(case::Symbol, fpair::Pair{String, String}, head::String, pgfoot::String, foot::String, t::Float64)
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/manager/file_utils.jl:153
 [19] process_file(::Symbol, ::Pair{String, String}, ::String, ::Vararg{Any})
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/manager/file_utils.jl:104
 [20] fd_fullpass(watched_files::NamedTuple{(:other, :infra, :md, :html, :literate), NTuple{5, Dict{Pair{String, String}, Float64}}}, join_to_prepath::String)
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/manager/franklin.jl:265
 [21] serve(; clear::Bool, verb::Bool, port::Int64, single::Bool, prerender::Bool, nomess::Bool, is_final_pass::Bool, no_fail_prerender::Bool, eval_all::Bool, silent::Bool, cleanup::Bool, on_write::Franklin.var"#268#271", log::Bool, host::String, show_warnings::Bool, fail_on_warning::Bool, launch::Bool, no_set_paths::Bool, join_to_prepath::String)
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/manager/franklin.jl:126
 [22] serve()
    @ Franklin ~/.julia/packages/Franklin/UskEZ/src/manager/franklin.jl:49
 [23] top-level scope
    @ REPL[2]:1

I am having problems running Franklin.jl on this repository after having run Pkg.update(): https://github.com/ziotom78/tnds-notebooks.

from franklin.jl.

tlienart avatar tlienart commented on July 18, 2024

for anyone stumbling against this, pin Franklin to 0.10.93 ( ] pin [email protected] ) while we investigate (the only change between 93 and 94 is this PR which intended to improve the behaviour of \toc). My bad for not testing this more but hopefully we can get out of this with more robust tests.

@ziotom78 and @yangcht can you guys point to a specific source file that throws this error please?

from franklin.jl.

ziotom78 avatar ziotom78 commented on July 18, 2024

Hi @tlienart , sure! This one: lezione07.md. (To trigger the error, you have to clone the repository and then run Pkg.update().)

from franklin.jl.

tlienart avatar tlienart commented on July 18, 2024

Released in 0.10.95. Note that CI fails here because of some compat requirement thing that I'm trying to figure out but it shouldn't cause issues elsewhere. https://discourse.julialang.org/t/compat-bounds-for-stdlib-and-empty-intersection-issue-on-ci/105898

from franklin.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.