Obsidian doesn't render markdown live previews after top several lines

Raw text

Exception:不啦不啦的一大堆~,熟悉不!?我们只要看Exception冒号后面说的那一句提示就好了,里面会有什么错了、错在哪了的信息。

会有哪些报错信息?

# 1/8

报错信息:

java.sql.SQLException: org.apache.spark.sql.AnalysisException: cannot resolve '`a`' given input columns:

关键信息:

cannot resolve  `a`  
无法解析a,说明a不存在,这时就去看具体报错位置,列a在SQL里被改了名字,还是压根不存在。

# 2/8
报错信息:

java.sql.SQLException: org.apache.spark.sql.catalyst.parser.ParseException: mismatched input '1' expecting <EOF>(line 1, pos 9)

关键信息:

mismatched input '1' 

这种报错问题比较不好找,但问题往往很简单,无非就是书写问题:比如字段名中间不小心插入了空格、符号、数字等。

# 3/8
报错信息:

java.sql.SQLException: org.apache.spark.sql.AnalysisException: expression 'aa.`qualityscoreentforprofile`' is neither present in the group by, nor is it an aggregate function. Add to group by or wrap in first() (or first_value) if you don't care which value you get.;;

关键信息:

is neither present in the group by, nor is it an aggregate function

    有分组函数,但是承担分组作用的字段select后面和group by后面不一致,比如前面有5个字段,后面只有4个字段分组,或者此处应为字段类型,而你输入了字符串等等。

# 4/8
报错信息:

java.sql.SQLException: org.apache.spark.sql.AnalysisException: Undefined function: 'cout'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.; line 1 pos 7

render preview:

I think the <EOF> tag is kicking in some “HTML” parsing which overrides the Markdown processing. You can escape it with \<EOF> or you could make each of the code sections a code block by putting bracketing them by
```
stuff
```

I have escaped everything in this response in order that it looks right (I hope).

1 Like

Thank you ! So this is a obsidian bug, it should not read markdown as html , hope the developers can fix it.

I found everything with <xxx> would break live preview:

1 Like