Giter Club home page Giter Club logo

Comments (11)

ladrua avatar ladrua commented on August 16, 2024

Im also getting this while manually setting the Internal Link. Though it works as expected.

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 359, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/Users/stianaurdal/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mediawiker.py", line 1079, in on_query_completions
    for p in pages:
  File "/Users/stianaurdal/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/listing.py", line 145, in __next__
    info = List.next(self, full=True)
  File "/Users/stianaurdal/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/listing.py", line 69, in next
    self.load_chunk()
  File "/Users/stianaurdal/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/listing.py", line 164, in load_chunk
    return List.load_chunk(self)
  File "/Users/stianaurdal/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/listing.py", line 74, in load_chunk
    data = self.site.api('query', (self.generator, self.list_name), *[(str(k), v) for k, v in list(self.args.items())])
  File "/Users/stianaurdal/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 188, in api
    res = self.handle_api_result(info, token=token)
  File "/Users/stianaurdal/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 215, in handle_api_result
    raise errors.APIError(info['error']['code'], info['error']['info'], kwargs)
errors.APIError: ('gapinvalidtitle', 'Bad title "GTD - Getting Things Done|Hei sann"', None)

from mediawiker.

tosher avatar tosher commented on August 16, 2024

Oh, thanks, i'll try to check it.
It's on wikipedia or not?

from mediawiker.

tosher avatar tosher commented on August 16, 2024

As i see, page "GTD - Getting Things Done|Hei sann" has incorrect title:

Bad title "GTD - Getting Things Done|Hei sann"'

| - is incorrect char in page titles"

Titles containing the characters # < > [ ] | { } _ (which have special meanings in Wiki syntax), the non-printable ASCII characters 0–31, the "delete" character 127, or HTML character codes such as &amp;. Note that the plus sign + is allowed in page titles, although in the default setup for MediaWiki it is not. This is configured by setting the value of $wgLegalTitleChars in LocalSettings.php.

from mediawiker.

ladrua avatar ladrua commented on August 16, 2024

That was probably a bad example, but i get it with simpler page titles as well.

errors.APIError: ('gapinvalidtitle', 'Bad title "Woksaus|Heisan"', None)

Its a personal wiki, mediawiki.
The Bad title error only comes when i start typing my text for the page link, the problem with autocompletion does not trow any errors, and I get the page printed in full, in the console. Its when I move one to name the link text this last error comes.

Thanks!

from mediawiker.

tosher avatar tosher commented on August 16, 2024

Yes, i see that! :)
Will think how to fix it.. Thanks!

from mediawiker.

tosher avatar tosher commented on August 16, 2024

Fixed.

from mediawiker.

ladrua avatar ladrua commented on August 16, 2024

now I only get

unexpected rule type, was expecting one of match, include, begin or patterns, got: {comment: unknown source}
unknown include #documentation
unknown include #documentation
unknown include #documentation
unknown include #documentation
unknown include #documentation
unknown include #documentation
unknown include #documentation
unknown include #documentation
unknown include #documentation
unexpected rule type, was expecting one of match, include, begin or patterns, got: {comment: Need to match a single expression like binding-exp}
reloading Packages/User/Mediawiker.sublime-settings

from mediawiker.

tosher avatar tosher commented on August 16, 2024

Completions must be shown only when cursor position pointed to internal link substring.
Can you describe in detail editable line and cursor position in it?

from mediawiker.

ladrua avatar ladrua commented on August 16, 2024

I write [[|]] and then i go into the field and start writing a name [[StartOfaPageTitle|]] and then TAB with the cursor directly at the end of my StartOfaPageTitle . Before the latest update, I got a full pagename response in the Console, but it was not passed to the edit window. After the update I'm not seeing anything in the Console(except the output I posted in my last comment). I do see a Login sucessfull in the status bar at the bottom. But thats it.

from mediawiker.

tosher avatar tosher commented on August 16, 2024

Thanks for description!

Some moments:

  • Showing page titles in console - it was forgotten debug print of titles. It was removed in fix.
  • Auto completions based on sublime settings:
    // Controls what scopes auto complete will be triggered in
    "auto_complete_selector": "meta.tag - punctuation.definition.tag.begin, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",

    // Additional situations to trigger auto complete
    "auto_complete_triggers": [ {"selector": "text.html", "characters": "<"} ],

If i try to start writing title in [[]] - autocompletions fires. All works ok. But with [[|]] - not. But works TAB (best matching) and Ctrl+Space (show completions list).
In first variant - we have meta.tag.. scope in cursor position, in second - not.

Now i make changes into highlighting scopes and i'll try to solve this moment.

  • Are you see completion titles after firing Ctrl+Space in context completion menu?

from mediawiker.

tosher avatar tosher commented on August 16, 2024

Please check auto-completion, with new MediawikiNG.tmLanguage.

from mediawiker.

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.