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

Shortcut "Code Block" does not support Org-mode source format #11060

Open
jbfil opened this issue Feb 29, 2024 · 0 comments · May be fixed by #11061
Open

Shortcut "Code Block" does not support Org-mode source format #11060

jbfil opened this issue Feb 29, 2024 · 0 comments · May be fixed by #11061

Comments

@jbfil
Copy link

jbfil commented Feb 29, 2024

I expect to use the preferred format for source block formatting.

Source link to problem area. Shortcut invoked with the /Code Block command uses markdown formatting always.

["Code block" [[:editor/input "```\n```\n" {:type "block"
:backward-pos 5
:only-breakline? true}]
[:editor/select-code-block-mode]] "Insert code block"]]

Example of where the preferred format is used for the < shortcut key.

raw (case preferred-format
:markdown {:bold (str "**" (t :bold) "**")
:italics (str "_" (t :italics) "_")
:link "[Link](https://www.example.com)"
:del (str "~~" (t :strikethrough) "~~")
:mark (str "^^" (t :highlight) "^^")
:latex "$$E = mc^2$$"
:code (str "`" (t :code) "`")
:pre "```clojure\n (println \"Hello world!\")\n```"
:img "![image](https://asset.logseq.com/static/img/logo.png)"}
:org {:bold (str "*" (t :bold) "*")
:italics (str "/" (t :italics) "/")
:del (str "+" (t :strikethrough) "+")
:pre [:pre "#+BEGIN_SRC clojure\n (println \"Hello world!\")\n#+END_SRC"]
:link "[[https://www.example.com][Link]]"
:mark (str "^^" (t :highlight) "^^")
:latex "$$E = mc^2$$"
:code "~Code~"
:img "[[https://asset.logseq.com/static/img/logo.png][image]]"})

Solution may be as easy as adding a preferred block selection. Not sure though since I don't program clojurescript.

jbfil added a commit to jbfil/logseq that referenced this issue Feb 29, 2024
@jbfil jbfil linked a pull request Feb 29, 2024 that will close this issue
jbfil added a commit to jbfil/logseq that referenced this issue Mar 4, 2024
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 a pull request may close this issue.

1 participant