Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: update inline link type #70

Merged
merged 4 commits into from
Jun 30, 2021
Merged

Conversation

RCmerci
Copy link
Contributor

@RCmerci RCmerci commented Jun 29, 2021

  • update Tag of string -> Tag of Inline.t list
  • remove inline.Block_reference s type , which is moved to inline.Link with inline.url=Block_ref <id>
  • update inline.url type
type url =
  | File of string
  | Search of string
  | Complex of complex
  | Page_ref of string  (* new added *)
  | Block_ref of string (* new added *)
(* before *)
Inline.Block_reference "id"
(* after *)
Inline.Link {url=inline.Block_ref "id"; ...}
(*
parse "[[a]]"
*)

(*before*)
Link
{ url = Search "a"
; label = [ Plain "" ]
; title = None
; full_text = "[[a]]"
; metadata = ""
}

(*after*)
Link
{ url = Page_ref "a"
; label = [ Plain "" ]
; title = None
; full_text = "[[a]]"
; metadata = ""
}
(*----------------------
parse "[label]([[aaa]])"
*)
(*before*)
Link
{ url = Search "[[page-ref]]"
; label = [ Plain "label" ]
; title = None
; full_text = "[label]([[page-ref]])"
; metadata = ""
}

(*after*)
Link
{ url = Page_ref "page-ref"
; label = [ Plain "label" ]
; title = None
; full_text = "[label]([[page-ref]])"
; metadata = ""}

@RCmerci RCmerci changed the title [WIP] enhance: update inline link type enhance: update inline link type Jun 30, 2021
@RCmerci RCmerci requested a review from tiensonqin June 30, 2021 05:20
RCmerci added a commit to logseq/logseq that referenced this pull request Jun 30, 2021
@tiensonqin tiensonqin merged commit 93dbfc2 into master Jun 30, 2021
@tiensonqin tiensonqin deleted the update-inline-link-type branch June 30, 2021 13:35
tiensonqin pushed a commit to logseq/logseq that referenced this pull request Jun 30, 2021
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.

2 participants