-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
🐞 Pandoc syntax create a bug : {#tbl:id1} is not a valid attribute name #31
Comments
I get this too, in my case on a header with a Pandoc-style ID attribute: #### my header{#foobar .foobar} If you create a header like that in the editor, then you don't get an exception, but the I think that
|
Apparently, this syntax was known long before this issue. It might be worth trying again, Now, because of the commented-out support for the #-syntax, this branch executes for |
Uncommenting out the following line allows to get rid of the error and diff --git a/src/processor.ts b/src/processor.ts
index 0b269f1..a914b1e 100644
--- a/src/processor.ts
+++ b/src/processor.ts
@@ -81,17 +81,17 @@ export default class Processor {
// { #id }
// currently not allowed due to Obsidian tag
// TODO: Figure out a workaround.
- /* const idChar = "#"; */
+ const idChar = "#";
const attrs: Array<[string, string]> = [];
for (let pair of trys) {
if (!pair || !pair.length) continue;
- //#id
- /* if (pair.charAt(0) === idChar) {
+ // #id
+ if (pair.charAt(0) === idChar) {
attrs.push(["id", pair.slice(1)]);
continue;
- } */
+ }
// .class
if (pair.charAt(0) === classChar) {
I think it's a fix in some sense (it's definitely better than it was), but clicking |
Check for existing bug reports before submitting.
Expected Behavior
The file is displayed entirely.
Current behaviour
The file, after the
{#tbl:id1}
is cut, and I can't click and edit in Live Preview. The file can be edited in Source.In Reading, the file is cut in a lot of place and the file is not displayed properly.
VS Sandbox :
LOGS :
Reproduction
Copy and paste the text
Which Operating Systems are you using?
Obsidian Version Check
1.4.14
Plugin Version
1.2.2
Confirmation
Possible solution
No response
The text was updated successfully, but these errors were encountered: