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

Code blocks still unreadable after #312 #316

Open
unbadfish opened this issue Apr 12, 2024 · 0 comments
Open

Code blocks still unreadable after #312 #316

unbadfish opened this issue Apr 12, 2024 · 0 comments

Comments

@unbadfish
Copy link

The extension failed to convert some code to markdown after PR #312 (tested in commit a2fd13e)
The behavior varied in different website.


https://learn.microsoft.com/en-us/vcpkg/get_started/get-started , in the partCreate the main.cpp file

  • Current: multiline, has tab, language unselected, blocks not removed
    a2fd13e-1
  • Previous: multiline, has tab, language unselected, blocks removed
    v321-1
  1. In a2fd13e, The <span> blocks are not removed
  2. In both versions, the empty links ref to moz-extension://.../_generated_background_page.html#4---build-and-run-the-project , not to a part of the real page (whichever to the markdown file or to the online website).
  3. A great improve of this extension is that, the TOC is generated correctly,
    current:
    a2fd13e-2
    previous:
    v321-2

https://threedots.tech/post/making-games-in-go/ , in the part Setting up the project.
Mentioned in #312 (comment)

  • Current: one line, no tab, language selected (go), blocks removed
    a2fd13e-3
  • Previous: multiline, no tab, language unselected, blocks removed
    v321-3

Here's what confuses me:

  1. Is there any "magic" code removed since v3.2.1? Can we copy some back?
  2. Why the behavior varied in different website?

My env:
Firefox developer v125.0b9 (64 bit)
Obsidian v1.5.12
Code (commit):
a2fd13e ,
https://github.com/deathau/markdownload/tree/a2fd13ef96118fdf4f16780cb8178a73d55911e3

My steps to install the extension:

  1. download the zip file in in commit a2fd13e ,
  2. unzip it,
  3. zip the src folder tosrc.zip,
  4. install the src.zip to Firefox

a2fd13e-1 (double quoted)

    ```
    <span><span>#<span>include</span> <span>&lt;fmt/core.h&gt;</span></span>
    
    <span><span>int</span> <span>main</span><span>()</span>
    </span>{
        fmt::print(<span>"Hello World!\n"</span>);
        <span>return</span> <span>0</span>;
    }
    </span>
    ```

a2fd13e-3 (quote)

package main import "github.com/hajimehoshi/ebiten/v2" type Game struct{} func (g *Game) Update() error { return nil } func (g *Game) Draw(screen *ebiten.Image) { } func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int) { return outsideWidth, outsideHeight } func main() { g := &Game{} err := ebiten.RunGame(g) if err != nil { panic(err) } }
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

No branches or pull requests

1 participant