Skip to content

A parser recognizes a link with a particular location in a list as a list item with a tag #88

Description

@vsuharnikov

According to https://orgmode.org/guide/Hyperlinks.html we can write a link with a precise location. For example:

* Tasks

Parsed as link: [[test.org::Heading]]

All these links parsed as list items with tags:
- [[test.org::Heading]]
- [[test.org::#1]]
- To overcome, just add :: to the list item before the link [[test.org::#1]]

Only the first and the last links parsed correctly. Here is a part of Syntax output:

LIST@96..215
  LIST_ITEM@96..120
    LIST_ITEM_INDENT@96..96 ""
    LIST_ITEM_BULLET@96..98 "- "
    LIST_ITEM_TAG@98..110 <============= HERE
      TEXT@98..108 "[[test.org"
      COLON2@108..110 "::"
    WHITESPACE@110..110 ""
    LIST_ITEM_CONTENT@110..120
      PARAGRAPH@110..120
        TEXT@110..120 "Heading]]\n"
  LIST_ITEM@120..139
    LIST_ITEM_INDENT@120..120 ""
    LIST_ITEM_BULLET@120..122 "- "
    LIST_ITEM_TAG@122..134 <============= HERE
      TEXT@122..132 "[[test.org"
      COLON2@132..134 "::"
    WHITESPACE@134..134 ""
    LIST_ITEM_CONTENT@134..139
      PARAGRAPH@134..139
        TEXT@134..139 "#1]]\n"
  LIST_ITEM@139..215
    LIST_ITEM_INDENT@139..139 ""
    LIST_ITEM_BULLET@139..141 "- "
    LIST_ITEM_TAG@141..165
      TEXT@141..163 "To overcome, just add "
      COLON2@163..165 "::"
    WHITESPACE@165..165 ""
    LIST_ITEM_CONTENT@165..215
      PARAGRAPH@165..215
        TEXT@165..199 " to the list item bef ..."
        LINK@199..215     <============= WORKS!
          L_BRACKET2@199..201 "[["
          LINK_PATH@201..213 "test.org::#1"
          R_BRACKET2@213..215 "]]"

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions