obsidian-latex-suite icon indicating copy to clipboard operation
obsidian-latex-suite copied to clipboard

[BUG] Snippets aside from `mk` and `dm` are not detected.

Open AlphabetsAlphabets opened this issue 1 year ago • 5 comments

Description

Only snippet detected are mk and dm everything else isn't. I only discovered this today.

To Reproduce

  1. Install Obsidian
  2. Install this plugin
  3. Go into options for latex suite
  4. Specify an external snippets file. Use this snippet file.

Expected Behavior

I'll type mk or dm so that the $ will be created. However, when I try to create a matrix with square brackets just by typing bmat inside the $$'s nothing happens. This isn't just for bmat it's for other things like when i type A2 I expect it to become A_{2} but it just stays at A2.

Additional Info

https://github.com/artisticat1/obsidian-latex-suite/assets/44822875/f4e9f44a-eb1f-42d6-9647-c7666047729d

EndeavourOS

AlphabetsAlphabets avatar Jun 26 '23 07:06 AlphabetsAlphabets

I'm not able to reproduce this.

  • Are there any errors in the console (Ctrl+Shift+I)?
  • Can you paste your debug info here (Command palette -> Show debug info)?
  • Does the issue occur with previous versions of the plugin?

artisticat1 avatar Jun 26 '23 17:06 artisticat1

Hello, it appears the plugin fixed itself as everything is working as intended. If the issue arises again I will re-open this issue but I hope not.

AlphabetsAlphabets avatar Jun 26 '23 23:06 AlphabetsAlphabets

Welp looks like it came back.

Are there any errors in the console (Ctrl+Shift+I)?

Yes. Here is the error.

image

Can you paste your debug info here (Command palette -> Show debug info)?

Here you go

SYSTEM INFO:
	Obsidian version: v1.3.5
	Installer version: v1.3.5
	Operating system: #1 SMP PREEMPT_DYNAMIC Wed, 21 Jun 2023 20:46:20 +0000 6.3.9-arch1-1
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: off
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 1
	Restricted mode: off
	Plugins installed: 15
	Plugins enabled: 15
		1: Advanced Tables v0.18.1
		2: Longform v2.0.3
		3: Note Refactor v1.7.1
		4: Pandoc Plugin v0.4.1
		5: Reset Font Size v1.0.2
		6: Style Settings v1.0.6
		7: Vimrc Support v0.9.0
		8: Dataview v0.5.56
		9: Templater v1.16.0
		10: Excalidraw v1.9.6
		11: Periodic Notes v0.0.17
		12: Imgur Plugin v2.2.1
		13: Mermaid Tools v0.2.1
		14: Relative Line Numbers v2.0.1
		15: Latex Suite v1.7.3

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Does the issue occur with previous versions of the plugin?

No. This has never happened before.

AlphabetsAlphabets avatar Jun 27 '23 02:06 AlphabetsAlphabets

Looks like I figured out the issue. There are two sections in the document the first half before <WHAT> is in the body. The other section is after. All the snippets load properly before <WHAT> and none work aside from mk and dm after <WHAT>. I like to use <WHAT> as a placeholder for missing information. It also looks like if I close the <WHAT> tag all snippets work properly. So guess it's an issue on my part.

AlphabetsAlphabets avatar Jun 27 '23 02:06 AlphabetsAlphabets

Looks like I figured out the issue. There are two sections in the document the first half before <WHAT> is in the body. The other section is after. All the snippets load properly before <WHAT> and none work aside from mk and dm after <WHAT>. I like to use <WHAT> as a placeholder for missing information. It also looks like if I close the <WHAT> tag all snippets work properly. So guess it's an issue on my part.

Yeah everything after <WHAT> and before the closing tag is treated as HTML but not Markdown. If you do not intend to insert HTML, escape it: \<WHAT>, or using a self-closing tag <WHAT/>

zcysxy avatar Jul 22 '23 19:07 zcysxy