Skip to content

Add plan for parsing Logseq outline format markdown#8

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/plan-logseq-outline-parsing
Draft

Add plan for parsing Logseq outline format markdown#8
Copilot wants to merge 3 commits intomainfrom
copilot/plan-logseq-outline-parsing

Conversation

Copy link
Contributor

Copilot AI commented Nov 30, 2025

  • Understand existing parser in mdToPipe.ts and rangeFinder.ts
  • Update plan to use generalized parser approach instead of preprocessing
  • Document that headings/codeblocks work regardless of list nesting depth
  • Identify setupChecks as the main function needing modification
  • Add findInnermostList helper function logic
  • Fix sort comparison function (ascending for innermost first)
  • Add guard for undefined list range
  • Update test file recommendations
Original prompt

This section details on the original issue you should resolve

<issue_title>Plan how to parse Logseq outline format markdown and execute them as pipedown scripts.

The plan output should be a single markdown file.</issue_title>
<issue_description>If every block in a file is preceded with a bullet, it likely came from a Logseq managed directory. We can, in memory, flag that this is likely a Logseq file and strip every parent/root level bullet while we walk the file for pipedown recognised syntax like - if:.

(Though it might make more sense to support Logseq style programmatic syntax by recognising things like if when it is the first thing on in the line of text, let me know if they might make things easier)

</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: aaronmyatt <11920225+aaronmyatt@users.noreply.github.com>
Copilot AI changed the title [WIP] Plan parsing of Logseq outline format for pipedown scripts Add plan for parsing Logseq outline format markdown Nov 30, 2025
Copilot AI requested a review from aaronmyatt November 30, 2025 08:47
@aaronmyatt
Copy link
Owner

@copilot let's try a different approach. Let's generalise the existing parser to work regardless of whether the headers, lists and codeblocks are nested in lists themselves.

The existing rules should apply:

A ## header and following codeblock become a function in the generated pipeline script. This happens regardless of how nested in lists they are. List syntax with one of the recognised variants, like - if: are still respected if they preceed a codeblock

Co-authored-by: aaronmyatt <11920225+aaronmyatt@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 30, 2025

@copilot let's try a different approach. Let's generalise the existing parser to work regardless of whether the headers, lists and codeblocks are nested in lists themselves.

The existing rules should...

Updated the plan in commit a816f3e to use the generalized parser approach. Key changes:

  • Parser now ignores list nesting depth when identifying headings and code blocks
  • findPipeName and findSteps already work with nested content (no changes needed)
  • setupChecks modified to use findInnermostList to find check patterns in the correct list context
  • - if: and similar syntax still works, just within the innermost enclosing list

The plan now reflects parsing Logseq files directly without preprocessing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan how to parse Logseq outline format markdown and execute them as pipedown scripts. The plan output should be a single markdown file.

2 participants

Comments