Giter VIP home page Giter VIP logo

Comments (26)

pbek avatar pbek commented on July 17, 2024

First please update to the latest version of QOwnNotes, then remove the script and install it again.

from scripts.

close2infinity avatar close2infinity commented on July 17, 2024

Sorry - I thought I had updated, but it seems the old version was still in memory.
I updated to version 18.09.1 and reinstalled the script. However, the issue persists.

from scripts.

pbek avatar pbek commented on July 17, 2024

Then it's best to post that issue on https://github.com/qownnotes/scripts/issues and mention the authors of the script.

from scripts.

pbek avatar pbek commented on July 17, 2024

That's the line of the script: https://github.com/qownnotes/scripts/blob/master/markdown-it/markdown-it.qml#L59

from scripts.

close2infinity avatar close2infinity commented on July 17, 2024

Hi, thx for the comments. I originally missed that this issue list is for all scripts - I updated the issue and included @MilanRusev, who I assume is the author.

from scripts.

pbek avatar pbek commented on July 17, 2024

Then it's best to post that issue on https://github.com/qownnotes/scripts/issues

oh, sorry. we already are on https://github.com/qownnotes/scripts/issues :D

from scripts.

pbek avatar pbek commented on July 17, 2024

btw. can you please execute ls -hal /home/fschoenh/.local/share/PBE/QOwnNotes/scripts/markdown-it/ and post the result.

from scripts.

close2infinity avatar close2infinity commented on July 17, 2024
drwxrwxr-x  2 fschoenh fschoenh 4,0K Sep 12 13:50 .
drwxrwxr-x 11 fschoenh fschoenh 4,0K Sep 12 15:01 ..
-rw-rw-r--  1 fschoenh fschoenh 253K Sep 12 15:24 markdown-it.js
-rw-rw-r--  1 fschoenh fschoenh 3,3K Sep 12 15:16 markdown-it.qml

from scripts.

close2infinity avatar close2infinity commented on July 17, 2024

I tried debugging this myself despite my very limited Javascript expertise.

  • The .js file seems to be loaded - renaming it results in a different error
  • MarkdownIt.markdownit is undefined for some reason, so the most likely culprit is the rather complex exports definition in the first line of the file

from scripts.

pbek avatar pbek commented on July 17, 2024

It's really strange, it works flawlessly for me...

from scripts.

pbek avatar pbek commented on July 17, 2024

Operating System: KDE neon User Edition 5.13
Build architecture: x86_64
Current architecture: x86_64
Release: Launchpad PPA
Qt Version (build): 5.5.1
Qt Version (runtime): 5.11.1

from scripts.

pbek avatar pbek commented on July 17, 2024

You could try downloading https://github.com/markdown-it/markdown-it/blob/master/dist/markdown-it.js directly...

from scripts.

close2infinity avatar close2infinity commented on July 17, 2024

I'll try that, thx for the support.

from scripts.

close2infinity avatar close2infinity commented on July 17, 2024

I found the issue. For some reason, on my system the imported script needs be referred to as 'this' instead of 'MarkdownIt'. I changed Line 59 to:

md = new this.markdownit(optionsObj);

... and now it works. I fear I know QML even less than I do know JavaScript - is there any explanation for this behavior?

from scripts.

pbek avatar pbek commented on July 17, 2024

so your system ignores the MarkdownIt part of import "markdown-it.js" as MarkdownIt, very strange

from scripts.

pbek avatar pbek commented on July 17, 2024

but according to https://doc.qt.io/qt-5/qtqml-syntax-imports.html the as should work

from scripts.

pbek avatar pbek commented on July 17, 2024

also in Qt 5.5 and 5.6: https://doc.qt.io/archives/qt-5.5/qtqml-syntax-imports.html

from scripts.

pbek avatar pbek commented on July 17, 2024

Do you use stock Ubuntu or some derivative distribution? Because you are using Qt 5.6.1 instead of the stock 5.5.1 of Ubuntu 16.04.

from scripts.

close2infinity avatar close2infinity commented on July 17, 2024

I have a Kubuntu 16.04

from scripts.

pbek avatar pbek commented on July 17, 2024

Interesting, I didn't know that the Qt version was getting updated by Kubuntu... or do you use a special repository for Qt?

from scripts.

close2infinity avatar close2infinity commented on July 17, 2024

I think I'm using the stock Kubuntu KDE, but this is a three years old dev system, so I might have added some PPAs I'm not aware of anymore.

from scripts.

pbek avatar pbek commented on July 17, 2024

Xenial is still at 5.5.1: https://packages.ubuntu.com/search?suite=xenial&searchon=names&keywords=qt

what does dpkg -s libqt5core5a say for you?

from scripts.

close2infinity avatar close2infinity commented on July 17, 2024
Package: libqt5core5a
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 5302
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Multi-Arch: same
Source: qtbase-opensource-src
Version: 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1
Replaces: libqt5core5 (<< 5.2.0+dfsg~)
Provides: qtbase-abi-5-6-1
Depends: libc6 (>= 2.15), libgcc1 (>= 1:3.4), libglib2.0-0 (>= 2.22.0), libicu55 (>= 55.1-1~), libpcre16-3 (>= 2:8.35-4), libstdc++6 (>= 5), zlib1g (>= 1:1.1.4)
Recommends: qttranslations5-l10n
Suggests: libthai0
Breaks: libqt5core5 (<< 5.2.0+dfsg~), libqt5scintilla2-12v5 (<< 2.9.2+dfsg-2~)
Description: Qt 5 core module
 Qt is a cross-platform C++ application framework. Qt's primary feature
 is its rich set of widgets that provide standard GUI functionality.
 .
 The QtCore module contains core non-GUI functionality.
Homepage: http://qt-project.org/
Original-Maintainer: Debian Qt/KDE Maintainers <[email protected]>

from scripts.

pbek avatar pbek commented on July 17, 2024

xenialoverlay1, seems like an Ubuntu maintained overlay for Kubuntu...

In any case, I guess we can close that issue now. It "should" work on all systems according to the Qt documentation... :)

from scripts.

close2infinity avatar close2infinity commented on July 17, 2024

Yes, thx for the support :-)

from scripts.

pbek avatar pbek commented on July 17, 2024

Hehe, good you found a solution yourself. ;)

from scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.