Skip to content

Odd truncation of function output #1860

@adxsoft

Description

@adxsoft
-- lists files that comply with a path and are referenced from links even if the page does not exist. 
function listfiles(path)
  local pages = {}
  for linked_page in query[[from tags.link select _.toPage order by _.toPage]] do
      if type(linked_page) == 'string' then
        if  linked_page.startsWith(path) then
          pages['[['..linked_page..']]'] = linked_page
        end 
      end
  end
  return table.keys(pages)
end
- ## Namespaces
- ### Area
    - ${listfiles('sb/commands')}

When line with - ### Area indented then function listfiles output has first two characters truncated. Note. The function works perfectly in other pages however the truncation of the function output appears to be specifically related to the heading above the function line getting indented

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedIf you're willing to help, do!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions