fix: outline keeps titles; full MD parse stays on Angstrom - #149
Merged
Conversation
#145's outline path dropped heading/paragraph Plain inlines (only refs/tags survived) and stamped every block with dummy pos_meta {0,0}. Logseq then showed empty titles, extracted nested headings as ["" "" "a\n- b\n- c"], and failed exporter TODO/SCHEDULED/quote-email plus generated graph import. Keep Plain in outline inline, emit real start/end offsets from the line scanner, and still collect same-line quotes in outline mode. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
|
|
ocaml/setup-ocaml@v3 warns that dune-cache will be removed in v4. Opam switch caching remains enabled via the default cache: true input. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Outline still returns heading titles (Plain + [[page]] / ((block)) / #tag) along with status, priority, properties, SCHEDULED/DEADLINE, and YAML front matter on the first block only. Mixed markdown (emphasis, code, autolinks) stays on the full rendering path. Property values extract page/tag/block refs with the outline scanner instead of full Inline.parse, which is the general hot path for property-heavy Markdown graphs. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
tiensonqin
marked this pull request as ready for review
August 31, 2026 09:52
The line scanner is outline-only. Full parse needs drawers, org blocks, definition lists, and fenced src positions so Logseq graph-parser matches published mldoc. Property values with macros skip the outline fast scan. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
try_fast_md_inline treated " \\n" as Plain spaces plus Break_Line, so
org quote blank lines imported as "it's a\\n \\norg blockquote". Match
Angstrom: two trailing spaces are Hard_Break_Line.
Do not Inline.parse property values just because they contain "{".
{{docs-base-url url}} must stay a plain string so Logseq can expand the
macro and infer :url.
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
The outline/inline fast scanners treated any '#' as a tag, so http://example.com/a#type became Tag "type". That made Logseq infer :user.property/url as :default instead of :url. Require a whitespace (or start-of-string) boundary before '#'. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
'#' after a letter is still not a tag (URL fragments). '#' after whitespace or trailing punctuation is a tag, matching Angstrom and graph-parser's parse-property tests. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Normal tags at start of text or after a heading marker are unchanged. Only '#' after a word character (URL fragments) is not a tag. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restore Logseq
graph-parsercompatibility for full markdown parse.The line scanner remains the outline path (
parse_outline_only). Full parse (parseJson, which graph-parser uses) goes back to Angstrom so mixed constructs match published mldoc:term/: definition)Src(including leading newline /pos_meta):LOGBOOK:drawers#+BEGIN_QUOTE/#+BEGIN_QUERY(and other org blocks)Also:
try_fast_md_inlinetreats two trailing spaces before a newline asHard_Break_Line(CommonMark).#is a hashtag only at start, after whitespace, or after trailing punctuation ('#bar'). URL fragments likehttp://example.com/a#typeare not tags, so:urlinference still works.Tests
dune runtest(markdown, outline, org, zip, export-md, export-opml)deps/graph-parserpnpm testagainst this JS build