Open rikugo1 opened 6 months ago
Hi @rikugo1 could you please post your actual markdown file.
(Attach the file, don't copy/paste the text)
Cheers Ronny
Sure thing, thanks!
There is a related issue.
When a card has a bullet point that is indented followed by text that is not indented, that text is also shown as indented although it should not be. Here is an example:
Actual text formatting:
Not indented text
Text formatting as shown during review:
Hi @rikugo1
Thanks for posting the file. The reason why this issue is happening is because of an Obsidian characteristic:
https://help.obsidian.md/Editing+and+formatting/Basic+formatting+syntax#Code+blocks
[!QUOTE] You can also create a code block by indenting the text using Tab or 4 blank spaces.
I don't think that the plugin can simply strip the leading whitespace before having the Obsidian library render it. From memory, that caused issue in some use cases.
Hi @dengrish could you please post your actual markdown file.
(Attach the file, don't copy/paste the text)
Cheers Ronny
A markdown file is attached. Thanks!
I did a bit of a research of this those problems there are not really related but that's not the case. Original issues is cause because of the initial spaced/tab the MarkdownRender interpreted it as code block. this is easy to fix just include a trim to the string and we should be fine. But while testing this cause any problems for other supported flashcards I tested the code block and the result looks off I have undone the change to check it was working before but it wasn't @ronzulu did you know, at some point the code block got rendered correctly or was this just me thinking it was working correctly. With working correctly I mean the copy button is at same position as in obsidian note.
A markdown file is attached. Thanks!
I think this is a problem with the Obsidian MarkdownRenderer it is somehow ignoring the \n
after - indented
not sure we are passing wrong formatting or this is a bug of obsidian api.
I think this is a problem with the Obsidian MarkdownRenderer it is somehow ignoring the
\n
after- indented
not sure we are passing wrong formatting or this is a bug of obsidian api.
Ok I checked this it is not a bug of the api it is the expected behavior if you switch to the reading mode
in obsidian you can see the same behavior and the render does the same.
Live preview:
Reading:
But I have seen there is a related issue #909 maybe the issue of this is fixable by trick the renderer and make him think it is a list there indents are possible and make the list points invisible but not sure how easy this is and possible cause issues
Hi @4Source
I have undone the change to check it was working before but it wasn't @ronzulu did you know, at some point the code block got rendered correctly or was this just me thinking it was working correctly. With working correctly I mean
Not sure. I didn't change any of that code, so the behavior likely has been the same for 9+ months.
Ok but I think we should fix the copy button of the code block
Same issue. This might be fixable if flashcards in list item are treated specially and other cases are left unchanged.
Same issue. This might be fixable if flashcards in list item are treated specially and other cases are left unchanged.
The problem here is that the html is generated by function of obsidian the result is difficult to edit because the not indented line is in same list item as the above list item
The only option I could imagine is to modify the input text for the render function add additional \n
after a end of list this would result in here expected outcome. This brings its own difficulties, especially the exact detection of list endings without affecting other texts.
Question
?
not indented
- indented
- indented2
<!-- new line here -->
should not be indented but is indented
But if someone expect the outcome is like in the reading view there is no option for them to achieve this if the text is internally modified. In my opinion we need a different solution.
Issue When a card is included within a bullet point that is indented, the front side of the card is rendered as a code block, which prevents rendering of formatting and LaTeX. It also shows up with a "copy" button underneath, which I assume is intended for debugging when something isn't rendered as expected.
Solution Ideally, the plugin would recognize that the card begins after the bullet point, or at least ignore any initial whitespace.
Example