Anki Forums

Strange behaviour in the HTML Editor

Have a look at the following image:

As you can see when I press Enter div appear which is normal.

However, when I undo this action using backspace on the start of the new line, a ‘strange’ combination of letters replace the div

Pretty sure this behaviour was not present in the previous versions, because I use the HTML editor quite a lot and I never noticed it.

1 Like

Thanks for the report, I’ll look into it.

1 Like

Previously reported here: Anki 2.1.34/35 Beta

This also started to hit me in 2.1.37. It can be especially annoying when editing hairy mathjax equations as it breaks the rendering and you have to manually remove the spans.

It’s strange that changing the color property in editor.scss to use some literal value instead of a variable solves the issue.


Thanks Abdo, that was helpful to know. It should hopefully be fixed in 2.1.38beta3.

1 Like

Oh thank goodness (and you both). That was annoying as hell.

e: Or so I would say (unrelated ofc):

ts/congrats/BUILD.bazel:13:11: //ts/congrats:bootstrap: missing input file 'external/npm/node_modules/svelte/types/compiler/utils/string_with_sourcemap.d.ts', owner: '@npm//:node_modules/svelte/types/compiler/utils/string_with_sourcemap.d.ts'

Try removing ts/node_modules

Did you do something like move the source folder prior to it breaking?

Removing that seems to have worked. I thought running git clean -fd prior to build would be enough, but I see now there’s a ts/.gitignore. Didn’t come to my mind that could be an issue since it wasn’t during the previous successful build two days ago.

Anyway, I’m just cp -r'ing the repo to a /tmp folder, there’s no change to any build files (other than incrementing .bazelversion, since 3.7.1 bugs out. Haven’t checked with 3.7.2 yet).

Perhaps you’re breaking symlinks by doing that. There is no need to copy the source to /tmp; the build products are placed in /tmp automatically, and moving the folder will cause more things to be recompiled than necessary.

The “need” is Arch’s packaging tool, building outside its builddir is considered sinful. But now that I’ve tested that it actually doesn’t bug out when one does, I guess I’ll ignore that from now on.

(It seems bazel is using a separate cache in my ~ anyway, though. Also, that .bazelversion really is a hard rather than minimum requirement, ie. bazel 3.7.2 also throws. Maybe better to check what bazel --version returns.)

.bazelversion is a pinned version for reproducible builds. Like any other version in the repo, nothing is stopping you from changing it to something else, but you will need to test that it doesn’t break anything.