Skip to content

asciidoc-preview in pulsar-editor opens blank window with no text rendered, same occurs in latest atom 1.63 (Markdown IS rendered in pulsar v1.100) #256

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

Open
5 tasks done
ianwillie opened this issue Dec 23, 2022 · 57 comments
Labels
bug Something isn't working package-issue This issue is present in a community package, but Puslar is the cause regression Something now broken that worked on Upstream Atom

Comments

@ianwillie
Copy link

ianwillie commented Dec 23, 2022

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Does your issue already exist?
  • Have you checked you are on the latest release of Pulsar?

What happened?

While editing an asciidoc text file in pulsar v1.63, window opens but text does not render. See screenshots attached. I
have found that the same bug occurs in the latest flatpak version of atom but works fine in the previous release. These releases are listed below. This was tested with the file test.html.adoc . (However, I cannot
attach it because adoc files are not supported by github apparently so remove the terminal ".txt".)
So it seems that some change has occurred in both pulsar 1.63 and atom 1.63 which prevents asciidoc-preview rendering text. I use asciidoc a lot for websites because the syntax is concise and quick to type for textual work.

asciidoc-preview renders correctly in this flatpak version of atom:
sudo flatpak update
--commit=cea629ca495e72d577eae4e64bff902ead937564bc67be7fd6d584554be3de36
io.atom.Atom
Atom 1.60.0 x64 from spash screen.
Electron 9.4.4, Chrome 83.0.4103.122, Node v12.14.1
Release notes from github 1.60.0 atom-build released this (2022) Mar 8
v1.60.0 03c9ad9

asciidoc-preview opens a blank window with no rendering in this version of atom:
Commit:
04c0909c66741eaedd959d013f18df74f6244ba9455914f85511e26601d23e01
Parent:
cea629ca495e72d577eae4e64bff902ead937564bc67be7fd6d584554be3de36
Subject: Change xprop archieve (d351a5c4)
Date: 2022-12-21 20:31:23 +0000
Atom splash screen: 1.63.1 x64
Electron 11.5.0, Chrome 87.0.4280.141, Node v12.18.3
Release notes from github 1.63.1 released this (2022) Nov 23
v1.63.1 539d250

TEST.html.adoc.txt

Which OS does this happen on?

🐧 Arch based (Manjaro, Garuda, etc.)

OS details

Manjaro latest versions

Which CPU architecture are you running this on?

64-bit(x86_64)

What steps are needed to reproduce this?

Open pulsar.
Open file test.html.adoc (attached but remove terminal ".txt" containing these 5 lines:
`
= TEST asciidoc rendering

Test asciidoc rendering.

`

Install asciidoc-preview
Open above file.
With cursor in file press Ctrl+Shift+A Window opens but text does not
render.

Repeat the procedure with the two different flatpak versions of atom
listed above to see the same bug appear in the l.63 version detailed
above.

Additional Information:

Screenshot: Pulsar 1.63 showing no asciidoc-preview rendering of text
Pulsar1_63NoRendering

Screenshot: Atom 1.63 showing no asciidoc-preview rendering of text
Atom1_63NoRendering

Screenshot: Atom 1.60 showing full asciidoc-preview rendering of text
Atom1_60CorrectRendering

@ianwillie ianwillie added the bug Something isn't working label Dec 23, 2022
@confused-Techie
Copy link
Member

Appreciate the contribution!

With this, especially since it's failing on the most recent version of Atom, is likely an issue stemming from bumping node versions, with that said the most helpful thing may be to add the logs from the dev pane if you could, that should tell us what's failing.

But I do want to note, that because this is a community package there may be limited things we can do, but hopefully still we can find a fix, even if it has to occur on a forked version of asciidoc-preview

@ianwillie
Copy link
Author

Hi confused-Techie.
Thanks for quick response. I am struggling with getting the dev pane operational in flatpak atom or native pulsar running in manjaro. I can get the dev pane to work fine in Ubuntu atom v1.60 (in which asciidoc-review works ) but cannot update this to v1.63 to access the logs with failing asciidoc-preview.
When I succeed I will get back to you on this issue: I am not ignoring it. There will be elements that ubuntu install automatically, I guess. I am a new convert to manjaro so until I get more familiar I am a "very-confused-techie", to coin a phrase!

@confused-Techie
Copy link
Member

The dev pane not opening (in some linux builds) is a known issue, that should be fixed in our most recent Alpha Binary, otherwise you could try the fix manually by starting Pulsar with --no-sandbox as a launch flag. It may be that Manjaro is just a bit more up to date on some libraries installed.

@ianwillie
Copy link
Author

ianwillie commented Dec 26, 2022

"pulsar --no-sandbox" did the trick. Many thanks.
(Also gets dev tools working in "flatpak run io.atom.Atom --no-sandbox" with Ctl-Shft-I. Also in AppImage of pulsar too.)
Here is the output from the console. See my note at the end of this. There was no additional output as I opened and closed the asciidoc-preview pane with Ctl-Shft-A. The panel opened & closed but there was no rendering of text.
I could not get --log-file to work.

pulsar --no-sandbox --version
Pulsar : 1.63.2022112808
Electron: 12.2.3
Chrome : 89.0.4389.128
Node : 14.16.0

############################################
electron/js2c/renderer_init.js:13 (electron) The remote module is deprecated. Use https://github.com/electron/remote instead.
log @ electron/js2c/renderer_init.js:13
electron/js2c/renderer_init.js:33 The vm module of Node.js is deprecated in the renderer process and will be removed.
o._load @ electron/js2c/renderer_init.js:33
/opt/Pulsar/resources/app.asar/node_modules/scheduler/cjs/scheduler.development.js:348 [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.
(anonymous) @ /opt/Pulsar/resources/app.asar/node_modules/scheduler/cjs/scheduler.development.js:348
/opt/Pulsar/resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:27773 Download the React DevTools for a better development experience: https://fb.me/react-devtoolsYou might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq
/opt/Pulsar/resources/app.asar/src/styles-element.js:107 [Deprecation] ::-webkit-details-marker pseudo element selector is deprecated. Please use ::marker instead. See https://chromestatus.com/feature/6730096436051968 for more details.
styleElementAdded @ /opt/Pulsar/resources/app.asar/src/styles-element.js:107
/opt/Pulsar/resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:12357 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

  • Move data fetching code or side effects to componentDidUpdate.
  • If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
  • Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run npx react-codemod rename-unsafe-lifecycles in your project source folder.

Please update the following components: Command
printWarning @ /opt/Pulsar/resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:12357
electron/js2c/renderer_init.js:109 Uncaught (in promise) Error: ERR_FILE_NOT_FOUND (-6) loading 'file:///opt/Pulsar/resources/app.asar.unpacked/node_modules/github/lib/renderer.html?js=%2Fopt%2FPulsar%2Fresources%2Fapp.asar.unpacked%2Fnode_modules%2Fgithub%2Flib%2Fworker.js&managerWebContentsId=1&operationCountLimit=10&channelName=github%3Arenderer-ipc'
at rejectAndCleanup (electron/js2c/browser_init.js:217:1457)
at Object.failListener (electron/js2c/browser_init.js:217:1670)
at Object.emit (events.js:315:20)

DevTools failed to load SourceMap: Could not parse content for file:///tmp/.mount_Linux.WhM1LM/resources/app.asar/node_modules/spelling-manager/lib/BufferSpellingChecker.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for file:///tmp/.mount_Linux.WhM1LM/resources/app.asar/node_modules/spelling-manager/lib/index.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for file:///tmp/.mount_Linux.WhM1LM/resources/app.asar/node_modules/spelling-manager/lib/regex-helper.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for file:///tmp/.mount_Linux.WhM1LM/resources/app.asar/node_modules/spelling-manager/lib/SpellingManager.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for file:///tmp/.mount_Linux.WhM1LM/resources/app.asar/node_modules/spelling-manager/lib/TokenCheckStatus.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for file:///tmp/.mount_Linux.WhM1LM/resources/app.asar/node_modules/spelling-manager/lib/TokenSpellingManager.js.map: Unexpected end of JSON input

Now Ctr-Sft-A pressed a few times. The asciidoc-preview window opened and closed as expected but there was no rendering of text. Nothing was added to the console output during this process.

@confused-Techie confused-Techie added regression Something now broken that worked on Upstream Atom package-issue This issue is present in a community package, but Puslar is the cause labels Dec 31, 2022
@ianwillie
Copy link
Author

Hi confused-Techie
A couple of weeks ago you wrote:

With this, especially since it's failing on the most recent version of Atom, is likely an issue stemming from bumping node versions, with that said the most helpful thing may be to add the logs from the dev pane if you could, that should tell us what's failing.

But I do want to note, that because this is a community package there may be limited things we can do, but hopefully still we can find a fix, even if it has to occur on a forked version of asciidoc-preview

I wonder if you would expand on your comment that the problem with asciidoc-preview not rendering text may related to bumping node versions.
I have a history of fixing bugs that have appeared when MS or others abandon software having a bit of experience of programming in the past.

I have had a look at some of the code for asciidoc-preview but I have no experience of working with node.js or java as I generally use R, Python, PHP, html, slim, Ruby, Sass, erb etc

I am intrigued by your comment as being a clue to where I might start looking for the problem. So any pointers that you can give me would be much appreciated.

Thanks for your help with this,

I should add that I have had found no other problems using pulsar with any of these:
/opt/Pulsar/pulsar --package list --installed --bare
Built-in Atom Packages (92) ...
Community Packages (16) ~/.pulsar/packages
[email protected]
[email protected]
([email protected] - my problem package)
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

@sertonix
Copy link
Contributor

sertonix commented Jan 5, 2023

I think the problem is that atom-space-pen-views was removed. It is used by asciidoc-.

Edit: I was wrong. That was used correctly.

@ianwillie
Copy link
Author

Just an update and a thank you to pulsar developers.
I have built a local copy of pulsar and learning to explore problems with packages so as to try and work out problems with asciidoc-preview. Of course, this will take time.

The process has been made much easier than I expected; using the "Hacking the Core" the build and first investigations went faultlessly. So thanks for that and other assistance. https://pulsar-edit.dev/docs/launch-manual/sections/core-hacking/#check-your-build-tools

@confused-Techie
Copy link
Member

Just an update and a thank you to pulsar developers. I have built a local copy of pulsar and learning to explore problems with packages so as to try and work out problems with asciidoc-preview. Of course, this will take time.

The process has been made much easier than I expected; using the "Hacking the Core" the build and first investigations went faultlessly. So thanks for that and other assistance. https://pulsar-edit.dev/docs/launch-manual/sections/core-hacking/#check-your-build-tools

Please always feel free to ask about any issues building or troubleshooting, we'd be more than happy to help. But glad to hear you're looking into this issues as well, thanks a ton for helping out!

@ianwillie
Copy link
Author

ianwillie commented Jan 20, 2023

I have just realised that pulsar 1.100.2023011006 (& 1.100.2022122619) do not render Markdown (.md) files in just the same way as is described above for Asciidoc .adoc files. A blank Markdown preview window showing the filenmame at the top appears and the console shows no additional output.
"flatpak run io.atom.Atom" runs Atom v1.60 which does render .md & asciidoc files correctly in the preview..
These Pulsar and Atom versions all render .html previews as expected.

Atom_1.63.1 Renders Markdown .md OK
Atom_1 63 1_MDRendersOK_Screenshot_2023-01-21_18-56-41

Atom_1.63.1 Fails to render AsciiDoc (v1.60.0 Renders AsciiDoc OK)
Atom1_63 1NotRenderingAsciidoc

EDIT Correction: Pulsar 1.100.2023011006 Does render MD with markdown-preview. markdown-preview-plus does not appear to render and also disables markdown-preview.
Pulsar1_101_2023012406RenderingMD_Screenshot_2023-01-20_15-37-48

Pulsar 1.100.2023011006 Fails to render Asciidoc
Pulsar1_100_2023011006NotRendering_Asciidoc_Screenshot_2023-01-21_15-37-48

Pulsar 1.100.2023011006 Renders HTML OK
Pulsar1_100_2023011006RenderingHTML_Screenshot_2023-01-20_15-37-48

@ianwillie ianwillie changed the title asciidoc-preview in pulsar-editor opens blank window with no text rendered, same occurs in latest atom 1.63 asciidoc-preview in pulsar-editor opens blank window with no text rendered, same occurs in latest atom 1.63 (Markdown not rendered in pulsar v1.100) Jan 21, 2023
@ianwillie
Copy link
Author

ianwillie commented Jan 27, 2023

EDIT Correction. In Pulsar 1.101.2023012406 x64 markdown files .md ARE rendered correctly with markdown-preview 0.160.2. The confusion to the contrary came about because markdown-preview-plus 4.11.3 does not appear to render .md files leaving a window with the correct name but blank contents. However, when markdown-preview-plus is enabled it also disables markdown-preview. It is markdown-preview-plus that is not showing a preview. When markdown-preview is re-enabled the preview appears with Ctrl-Shft-M. The preview is also closed (toggled) with the same keys. (In markdown-preview the .md window does not appear to be synchronised with the preview window. )

For clarity, asciidoc-preview still does not render but opens a window with a title and blank contents. Just as it is described above.

@ianwillie ianwillie changed the title asciidoc-preview in pulsar-editor opens blank window with no text rendered, same occurs in latest atom 1.63 (Markdown not rendered in pulsar v1.100) asciidoc-preview in pulsar-editor opens blank window with no text rendered, same occurs in latest atom 1.63 (Markdown IS rendered in pulsar v1.100) Jan 27, 2023
@confused-Techie
Copy link
Member

This is some amazing investigation. But due to the failure occurring in the last version of Atom as well, then we can know it's tied to the Electron bump we have both done. So we would have to see exactly what these packages rely on that's changed

@ianwillie
Copy link
Author

This is all something of a steep learning curve for me. I am working through Hacking the Core & learning about how packages are constructed. I have had a look at ascidoc-preview package and trying to see what would have changed in the environment around the package because the package itself has not changed. I have a set up a dev package for it and I am about to insert debug messages to indicate what is working. Since there are no error messages that I can see and the tests seem to run OK, I surmise that it must be something pretty near the end. Tracking down the html that is used to generate the final output is my goal at the moment. However, I am so new to node.js, never seen coffee in which ascii-preview is largely written it is all a bit hit & miss at the moment. But, I am learning slowly with the help of others paticularly an informed, even if confused Techie! Thank-you.

Getting asciidoc-preview will eventually be worked out I a sure because the various editors that have such a preview all seem to use the same application, Asciidoctor.js, to do the job.
https://docs.asciidoctor.org/asciidoctor/latest/

@ianwillie
Copy link
Author

ianwillie commented Jan 31, 2023

I could do with some help now using pulsar & atom in dev mode to debug the asciidoc-preview package so that I can inspect various variables as the process takes place.

QUESTION:
What I want to do is to run the pulsar...appimage --dev no--sandbox with a copy of the supplied asciidoc-preview in .../dev/packages/ians_asciidoc-preview which will be used to insert debug messages. How do I invoke pulsar so that it uses ians_asciidoc-preview. I don't seem to be able to do that using the supplied appimage. I have a memory that I could do that using my locally built pulsar but my intention is to use the supplied pulsar & atom images to see exactly what is happening with them when they fail or succeed to produce a preview or html version of the test.adoc file. I will compare it with what happens with atom 1.60 which does produce a preview, an html and a pdf version of the test.adoc file

My preliminary conclusion looking at all the coffeescript files in lib and transcoding them to javascript, with which I am more familiar, is that the path, filename or extension is not being obtained correctly. A conclusion drawn from the observations that the asciidoc-preview pane is headed "Asciidoc Preview" when "test.adoc preview" with the filename is expected. Similarly the html output obtained on R-click menu on the asciidoc-preview pane is headed "untitled.adoc.html" This html file when saved contains a ... section which appears OK with lots of styles and so on but with a ../ syntactically correct but empty where the output from the .adoc file should be. It seems that the filename cannot be identified for some reason.

Writing this I have just noticed that with atom 1.60 the html version of the asciidoc-preview is correctly saved in
"/media/Data/Docs/middleman_sites/ManjTEST01Private/source/_TestOnly/test.adoc.html" where the failing pulsar is trying to save in
"/media/Data/Docs/middleman_sites/ManjTEST01Private/untitled.adoc.html". It is trying to save in the root of the Middleman CMS instead of the correct subdirectory. So it looks as though the path is not being correctly picked by one of the asciidoc-preview coffeescript files, like .../lib/main.coffee: time will tell. That could be due to some change in Eclipse, node.js or Chrome not being allowed for in asciidoc-preview: I surmise?

By debugging the coffeescript (or .js files if I can make them work OK) I hope to tract down the origin of the error. Then look farther for the source of the problem

An interesting note is how in writing this description and checking all the details as I go I found the last bit of evidence about the different eroneous path which would have gone unnoticed without this detailed effort. We live & learn.

EDIT: I forgot to add that I have been using Mike Dane's Giraffe Academy website to crash learn Javascript - https://youtu.be/TLlGhogq56Y Some of the best learning resources where I have learnt Middleman CMS, Python, CSS, Ruby and several other.

@confused-Techie
Copy link
Member

@ianwillie
So try and answer the questions I can:

  • To use a package with Pulsar (No matter what version or how you run it) the package needs to be installed into your .pulsar folder. If you are working with a local package that you've made changes to, you can use ppm link or apm link to link that local package to your .pulsar folder as if it was installed normally. Then just run Pulsar.

  • As for a path issue, I'd check in the code where the package tries to save the file, see if the code is using any Pulsar, NodeJS, or other kind of API to determine it's save location. That very likely sounds like it's the source of the errors. Find what API it's using then ideally we can see how the needed changes could be implemented to either change how it's saved, or change how it's then read after the fact. Since NodeJS the Chromium APIs, and Pulsar APIs have all changed, so every one of them is a possible proponent of the issue

@ianwillie
Copy link
Author

ianwillie commented Feb 1, 2023

Thanks for that simple and elegant solution to managing packages. Much easier than using dev subdirectory. I have got my own versions of atom-asciidoc-preview up and running. I will report the results in due course.

One point of note is that if we are using a flatpak of atom then the changes which you suggest, or links to them. seem to have to go into the Flatpak systemwide /var/lib/flatpak, or per-user $HOME/.local/share/flatpak. Maybe the same applies to appimages.

EDIT: Here is the answer: on running "flatpak run io.atom.Atom" at the top of the Settings, Install Packages screen it says "Packages are published to atom.io and are installed to ~/.var/app/io.atom.Atom/data/packages" and indeed they are:
$ ~/.var/app/io.atom.Atom/data/packages$ ls
asciidoc-assistant atom-material-contrast-syntax html2slim preview-plus

$ ~/Downloads/Pulsar-1.101.2023012406.AppImage
Settings, Install Packages says:
"Packages are published to web.pulsar-edit.dev and are installed to ~/.pulsar/packages".

(I don't know where to get an Appimage of atom to test that. https://apprepo.de/appimage/atom does not seem to load.)

@confused-Techie
Copy link
Member

That's an interesting point, and sorry to say I don't have the answer there. Something like that might be a good idea to ping @Linux on our Discord server to find out more. But at the very least glad to hear this can help you test!

@ianwillie
Copy link
Author

Update: We seem to be on the right track because various console.log(filename) additions are finding filenames matching the source filename.adoc in atom v1.60.0 asciidoc-preview/lib/main.coffee & asciidoc-preview-view.coffee. However, in pulsar, & atom 1.61 or later not one of these that I have found is correct; these are undefined or very strange. The strangeness is that the form is like "asciidoc-preview://editor/7". Also after keystroke Ctrl-Shft-A which should produce the asciidoc-preview sometimes a new file like "asciidoc-preview://editor/xx" is appearing where xx is a number like 26, 34. They seem to be a files in .../editor which resolutely refuse to be deleted and keep reappearing on Ctrl-Shft-A. I wonder if they are related to a line number where the editor if picking up some sort of error or unexpected End of File.
I've had enough of all this for today so I will sleep on it but any ideas would be a help.

@confused-Techie
Copy link
Member

Super strange filenames you are seeing there.

I wonder, it almost looks like it's generating URIs, we haven't made many changes to our URIs but maybe one is accidentally being passed where it shouldn't?

Beyond that I'd probably have to take a look at the packages source code to really know, but I'd probably check to see if this package is using the URIs in any way to open and manage it's saved files?

@ianwillie
Copy link
Author

Just an update. I am struggling with lack of familiarity wi Javascript, coffescript and node.js. However, this is being rectified by doing some learning on these subject helped by a knowledge of writing in other things like Fortran, Pascal, Python, R and DataBasic once upon a time. It does mean starting right at the beginning which will take a bit of time but I am maintaining interest in getting asciidoc-preview working in pulsar and supporting the project.
Any advice on resources for learning the kind of node.js that is most appropriate to pulsar and asciidoc-preview would be most appreciated.
I have found that there are virtually no comments of any description in the source code of 873 lines in all. That is not quite true because I did find about 12 comments but all seem to have been additions to the original program to manage bugs that appeared. So working out what each part of the program is doing is hard. for example "uriForEditor: (editor) ->
"asciidoc-preview://editor/#{editor.id}" appears in main.coffee, line 114, with no explanation of how it relates to surrounding lines. This is mentioned in my comment 2 days ago as "asciidoc-preview://editor/7".

So I will be back doing more work on this soon. For now, I am stuck using atom 1.60.0 (or VSCodium etc) because for writing websites in AsciiDoc having an integrated preview which renders the code without all the styling and processing that occurs in a browser speeds up writing greatly. I am committed to community supported projects because over the years I have had work interrupted by large companies buying over small innovative software projects and either abandoning them or introducing licences that were so expensive as to be unavailable to mere mortals. But that is a discussion for another time in another place!

@confused-Techie
Copy link
Member

@ianwillie I apploud your efforts to find this bug and learn JavaScript/CoffeeScript at the same time.

Really I'm not familiar with CoffeeScript at all myself, I just look at what little I know and try to convert to JavaScript in my head, this is largely why we want to remove CoffeeScript from Pulsar.

But to learn these, personally I think these are the best resources (but you may have already found them)

But that does seem interesting, if you'd like I'll try to take a look at it as well, and report any of the findings I'm able to see back here

@ianwillie
Copy link
Author

Thanks for your support and encouragement.
I used decaffeinate to translate the coffeescript to javascript. It is easier to make out what is going on. I have not tried running the js but only to see the full syntax. It looks OK but I have been doing little more than adding a few console.log statements to the coffee files. I see that plain javascript statements run fine in coffee files so it should be relatively easy to convert them to js bit by bit.
What I have been trying to do is insert the correct path to the .adoc file in main.js and see if it will be rendered & previewed as expected. But I do not know enough about fs & path modules yet to get this working. Hence, stepping back to learn some basic node.js & javascript from the ground up.
I can send you some of my files when I am a little bit further on with discovering things.

@ianwillie
Copy link
Author

ianwillie commented Mar 2, 2023

Here's an update on what I have been doing.

  1. Learning node.js & more Javascript. (Thanks for your recommendations confused-Techie.)
    Discovered these resources "The Node Beginner Book: a comprehensice node.js tutorial" 59 pages & "The Node Craftsman Book: an advanced Node.js tutorial" c160 pages, both by Manuel Kiessling (a bundle for about $9. https://leanpub.com/b/node-beginner-and-craftsman-bundle , the printed books are quite expensive.
    The beginner book was highly recommended on some sites because it dealt with high level Javascript & Node for those familiar with programming but not with these languages. I found it great because I was quickly able to find out about how to get servers going, event driven callbacks, function passing, requests, responses and many other things I knew a little about but no idea how to program them in node & JS. This plus concepts like sync & async, event driven, dependency injection, blocking & unblocking, callbacks, function programming being about doing: verbs rather than things: nouns, functions calling functions as arguments. These descriptions of concepts were accompanied by references to important papers explaining how these concepts actually mattered in the world of Node. It gave program changes to demonstrate the effect of a complex linux shell "find" call blocking a program and how to overcome ysung async methods. There were examples of server programs initially using included procedures and how to compact these into function arguments to functions The author demonstrates how these techniques which might be used in other languages might minimise obscure bugs in node. Although written a while ago c2012 with node v0.4.9 the programs ran without modification on current node.js v16.19

All the programs given were fairly short, moderately high level and complete so that they could be implemented and run immediately. As a beginner I struggled with the excellent likes of JS MDN & Node.JS & nodejs.org because the examples given were snippets of code that were missing some essential components that would be second nature to experienced users but just not to someone unfamiliar with JS. With hindsight, I realise just how clear and complete these two website are. Thanks for the recommendation confused-Techie.

  1. I searched about to find a good dump program to output the structure of objects and functions and it seemed that JS was a little light in this respect. However, I came upon a program based on dump in Coldfusion ( originally written as part of Macromedia's Dreamweaver which I used to use and loved until it was bought out and licensed by Adobe). https://www.npmjs.com/package/nodedump has a wonderful description of it with example code which will run directly in node.js. It produces in the server browser a graphical demonstration of the object using html tables which can be customised with arguments to the nodedump function. For example, headings of object names can be expanded and contracted by clicking on their title. This is most concise and should help to compare, for example, the structure of a working atom version with a later dysfunctional pulsar version and get some idea of where the problem lies.

That is where I am now having learnt JS enough to turn nodedump into a function which can be included as a module & function in asciidoc-preview to track down where the pulsar atom versions >=1.61 loose track of the filename to be rendered in html by comparing with the working atom 1.60.

  1. I have worked out how to put together a node program that reads an asciidoc, adoc file, translates it to html and renders it in Firefox, refreshing the view on any change when the .adoc file was edited. This was accomplished withless than 20 lines of Node.js code. It seems to me that there must be a simpler way to re-implement asciidoc-preview.js as it exists in over 1000 lines of coffeescript into a new version. To recap, the current asciidoc-preview does not render text in Atom after V1.60 or in any present Pulsar version. I plan to look at Pulsar modules which render markdown and html correctly and see it they can be adapted to accommodate asciidoc and maybe other previews too. One of the complexities is likely to be that required to re-render the text view as changes are made to the .adoc file and not be dependent on saving the file first for changes to show.

EDIT: Minutes ago, just received a copy of 7th edition of David Flanagan's "Javascript: The Definitive Guide" much of which I can actually understand. In the past the 6th edition was over my head: so all this effort is definitely worthwhile.
EDIT: By accident added a heart like emoji to my own post. Can't find out how to remove it: oh well!

@confused-Techie
Copy link
Member

Love all the learning and effort going into this @ianwillie. please feel free to message me on here or Discord if you ever need any programming (in JavaScript assistance) and I'd be more than happy to help

@ianwillie
Copy link
Author

@confused-Techie
Thanks for advice about how to manage all this: it is very new to me. I get your point about now having a repository there is no need to send files and so on. Also that we have got a bit off topic on this thread.
Would this be what to do?

  1. Recreate the package & repository & place on github naming it to something more meaningful like acidoctor-preview-pulsar-edit. ( It uses asciidoctor.js to convert from .adoc to .html which is subtly different from ascidoc.xx versions, I understand.) The current one that does not work on pulsar is called asciidoc-preview.
  2. Clean up this thread to end it with a link to the github repository.
  3. Start a thread on Discord saying that it exists by linking to it and use that for future discussions about it.
  4. Not put it up as a pulsar package but leave it on github till it is more mature.
    Kind wishes.

@confused-Techie
Copy link
Member

No worries, glad to see youre taking the time to learn things as needed then!

  1. Honestly, youre repo has a perfectly fine name. You can change it or upload your package again to GitHub under a different name, but only if you want to, what you have right now on GitHub is totally fine, if you like it. And once it is eventually uploaded to the Pulsar Package Registry, Pulsar will use whatever name is put in your package.json file, rather than the name of the repo on GitHub.
  2. No need to clean up here, but yeah ending it off for now with a link to your repo would be awesome!
  3. But yeah a thread on Discord could work if you'd like to talk further about this, or we could start an issue over on your repo itself, whatever you'd like
  4. Then lastly yes, once you feel your package is ready getting it uploaded to the Pulsar Package Registry would then fix the problems here for not only you, but everyone that uses Pulsar!

@ianwillie
Copy link
Author

ianwillie commented May 8, 2023

Thanks for that @confused-Techie . I've not forgotten about this and thanks for your advice which I will follow.
I've been exploring using existing resources like markdown-preview, atom-browser, atom-html-preview and atom-multitheme-applicator (can't remember name quite), or just using an external browser. The first two do most of what I am looking for and the last we end up doing anyway. I am putting something together to be able to use them from the package which I put on github.
It will be a bit of time till all this happens cos there is a huge amount to learn with pulsar package development.

@ddreggors
Copy link

I am trying to read through the comments here, but I am unsure if this is the start of a new plugin or an attempt to repair the existing plugin. In light of that I have questions...

What is the direction here?
Is there any movement here?

@confused-Techie
Copy link
Member

@ddreggors A quick summary of the conversation here.

It seems the package itself is broken, and changes likely need to be made within the package to fix this.
But the package asciidoc-preview is a community package, meaning it's entirely made and maintained by community members like yourself.

But asciidoctor/atom-asciidoc-preview has been archived, meaning the package itself, if the issue is truly within the package, can never be repaired. Meaning a community member needs to fork the package and fix it, then republish, or a new package would need to be created.

The previous commenter here set out to do exactly this, create a new package to provide this functionality. Although it's been about 6 months since the last activity on their repo, so I'm unsure of their current progress.


Otherwise, now that we do bring this up again, it seems that asciidoc-preview may be a great candidate for the Pulsar Cooperative Program

@ianwillie
Copy link
Author

ianwillie commented Nov 8, 2023

@ddreggors @confused-Techie I'm glad to hear that someone is interested. I do have a working version o my asciidoctor preview that I am this very day about to push to github https://github.com/ianwillie/ianasciidocpreview-active-editor-info . I am quite new to using github and it will take me a few hours (maybe days) to sort out how to update this so that it clones properly.

My version is simple it will preview an .adoc file in a pane using asciidoctor.js encapsulated in html. The resulting preview styled using asciidotor.css can be resized, scrolled and zoomed. However, syncing the .adoc & preview has defeated me so far because I can't work out how to get internal links (<div id="mytarget"> ... <a href="#mytarget">) , or something similar, which work fine in a browser to work in a pulsar pane. This means that after an .adoc update and save the preview always reloads at the start of the file and not where if was before the save. This will be reported as an issue for which I would like help when the latest version is finally pushed.

This is very much a developing project but I do use it for a web site management every day and it works for me. There are a few bugs and quirks which need ironing out. My intention is to write the app in standard html as far as possible and avoid use of webview or electron ipc . The idea is that any changes to ipc or webview being deprecated should not affect the app. It should be independent of nodejs versions.
I will try to get the latest working version pushed today and put a note to that effect here. I am a relative beginner in this kind of programming so please be aware.

I have had a look at pulsar markdown-preview from pulsar core and it should be quite simple to substitute asciidoctor.js for the renderer, or so I THINK! However, I have failed to get the current markdown-preview to compile because it seems to have dependencies that expect nodejs v18 which is higher than the version used by pulsar. I am not sure how to proceed with this and have not explored any farther.

Thanks for your interest and help.

EDIT 20231108 I've just updated https://github.com/ianwillie/ianasciidocpreview-active-editor-info and downloaded a clone to test and it appears to be OK. I am not sure about installation but putting the package in ~/.pulsar should work. A link should work too. The read.md is a bit out of date but the first paragraphs are accurate.
All the commands for the package are preluded with Ctrl-Shift-Alt keys. With the cursor placed in an open .adoc file in pulsar these three keys held down simultaneously with a Y should open a Right pane with a preview. The three keys with a + or a - key will zoom in or out. There is also a packages menu entry for the preview but not for the zoom.

Please let me know if it seems to work. But it is definitely work in progress and is getting more attention as I learn more thanks to all of you for help.

@dadreggors
Copy link

I followed instructions, and I see the package loaded in Pulsar, but when I try to toggle nothing opens and I get this error in devloper console:

fs.js:476 Uncaught (in promise) Error: ENOENT: no such file or directory, open './temp/XXXasciidocInputFromEditor_words'

@ianwillie
Copy link
Author

@confused-Techie .

An update on asciidoc-preview.

I have followed your suggestion and adapted markdown-preview to preview asciidoc source code.
In brief, using asciidoctor.js as the renderer virtually everything functions as expected but extensive changes were needed to the package.
However, I would like some advice as to how to proceed. Basically I have copied the pulsar markdown-preview bundled package and extensively adapted it. This has involved changing much of the code removing chunks that are not relevant, adapting css & styling and making changes where the functionality is contained in asciidoctor.js. All references to markdown have been removed.
Technically this is a fork but in reality it will end up being a rewrite greatly inspired by markdown-preview and support from yourself and others.

My inclination is to set it up on github as a separate entity rather than a fork of markdown-preview but underlining my great debt to that package. How would you suggest I proceed? You have given me valuable advice for this project often before.

Here is a summary of what works so far: magically almost everything. But I have to add that it has taken me a year to learn amongst many other things js, cofeescript (a bit), git, the intricacies of pulsar (and the confusion caused by sunsetting of much of atom help). On the way I wrote my own preview package https://github.com/ianwillie/ianasciidocpreview-active-editor-info which was a learning exercise really and explored unsuccessfully extending (atom-)asciidoc-preview which stopped working due to changes in electron versions.

What DOES WORK so far "iansasciidoc-preview-frommarkdownpreview" ( temporary name).

  • Basically almost everything that works in markdown-preview.
  • All editor functions like zoom, resize, scroll. Clipboard copying from preview. Editor code highighting using language-asciidoc (settings are very important or preview does not function.)
  • Auto update ( if turned on in setup) & preview on save (if turned off).
  • Styling based on asciidoctor.css supplemented to show scrollbars and the like in the preview.
  • All attributes set in adoc header like:
    • Table of Contents (:toc: left),
    • Author details,
    • Callouts <1> <2>,
    • Tables,
    • Preview code highlighting (a bit iffy).
  • All External Links to external media files display including mp4, youtube, png, svg, jpg.
    • Internal links & targets are not functional as is the case in markdown-preview.
  • Unique keycode for preview toggle.
  • Convert options & attributes on asciidoctor.convert(text, {...}).
  • Save html file & copy html to clipboard.

@greyp9
Copy link

greyp9 commented May 20, 2024

Any progress on this one? I think I'm seeing similar (MacOS 14).

Screenshot 2024-05-20 at 13 08 12
Screenshot 2024-05-20 at 13 07 37

It seems like something that would be easily diagnosed by a Pulsar dev. Even if it is lower priority, it would be nice to identify the cause.

BTW, nice implementation! I never used Atom, but looking for a good general-purpose editor.

@savetheclocktower
Copy link
Contributor

@greyp9 I'd suggest installing @ianwillie's package as follows to see if it works for you:

pulsar -p install ianwillie/ianasciidocpreview-active-editor-info

@savetheclocktower
Copy link
Contributor

My inclination is to set it up on github as a separate entity rather than a fork of markdown-preview but underlining my great debt to that package. How would you suggest I proceed? You have given me valuable advice for this project often before.

@ianwillie, if you're asking how to communicate that it's mainly copied from markdown-preview, I wouldn't worry about it. All of Pulsar's code is MIT-licensed; you may use it for any purpose you wish, as long as you mention that you're using MIT-licensed code. It's not a fork of anything; it's just a port of the general approach of markdown-preview to a different system.

@greyp9
Copy link

greyp9 commented May 20, 2024

@greyp9 I'd suggest installing @ianwillie's package as follows to see if it works for you:

pulsar -p install ianwillie/ianasciidocpreview-active-editor-info

The install appears to have worked:

% pulsar -p install ianwillie/ianasciidocpreview-active-editor-info
Cloning https://github.com/ianwillie/ianasciidocpreview-active-editor-info.git ✓
Installing modules ✓
Moving ianasciidocpreview-active-editor-info to [~]/.pulsar/packages/ianasciidocpreview-active-editor-info ✓
% 

I see the new options on right-click of an adoc.

Screenshot 2024-05-20 at 15 29 08

But selecting "toggle" does not appear to do anything.

@savetheclocktower
Copy link
Contributor

savetheclocktower commented May 20, 2024

I think you want “BrowserPopup” or its key equivalent.

EDIT: OK, maybe not. Perhaps @ianwillie can help you. ;-)

@greyp9
Copy link

greyp9 commented May 20, 2024

Thanks.

"Toggle" and "BrowserPopup" do not seem to do anything. "ZoomUp" and "ZoomDown" cause the display of an exception:

Screenshot 2024-05-20 at 17 21 09

stack trace:

Uncaught Error: ENOENT: no such file or directory, open 'temp/iansasciidocpreviewtransformscale.txt'

internal/fs/utils.js:307
[Hide Stack Trace](https://github.com/pulsar-edit/pulsar/issues/256#)
Error: ENOENT: no such file or directory, open 'temp/iansasciidocpreviewtransformscale.txt'
    at Object.openSync (fs.js:476:3)
    at Object.func [as openSync] (electron/js2c/asar_bundle.js:5:1846)
    at Object.writeFileSync (fs.js:1467:35)
    at Object.transformScaleUp (ianasciidocpreview-active-editor-info.js:205:12)
    at HTMLElement.ianasciidocpreview-active-editor-info:transformScaleUp (ianasciidocpreview-active-editor-info.js:42:80)
    at CommandRegistry.handleCommandEvent (/Applications/Pulsar.app/Contents/Resources/app.asar/src/command-registry.js:405:43)
    at CommandRegistry.dispatch (/Applications/Pulsar.app/Contents/Resources/app.asar/src/command-registry.js:292:17)
    at AtomEnvironment.dispatchContextMenuCommand (/Applications/Pulsar.app/Contents/Resources/app.asar/src/atom-environment.js:1598:19)
    at EventEmitter.outerCallback (/Applications/Pulsar.app/Contents/Resources/app.asar/src/application-delegate.js:306:47)
    at EventEmitter.emit (events.js:315:20)
    at Object.onMessage (electron/js2c/renderer_init.js:93:925)

@greyp9
Copy link

greyp9 commented May 20, 2024

Do you have any reports that asciidoc-preview works in Pulsar for any user? It would be different if it fails to work for some class of users. But maybe this is something where the plugin has different expectations for its underlying environment because it was written to work with Atom.

@greyp9
Copy link

greyp9 commented May 20, 2024

Here is a sample adoc that would be sufficient for a quick verification:

= test

== test

=== test

@savetheclocktower
Copy link
Contributor

Do you have any reports that asciidoc-preview works in Pulsar for any user? It would be different if it fails to work for some class of users. But maybe this is something where the plugin has different expectations for its underlying environment because it was written to work with Atom.

Honestly, I don't know. It's not popular enough of a package for us to know that sort of thing. The only major thing we've done since forking from Atom (the only thing that would affect package compatibility, anyway) is bump the version of Electron. That comes with its own bump of Node, so either of those things could result in an incompatibility.

If any of us used AsciiDoc ourselves, or had need for an AsciiDoc package, we'd be able to get this fixed. But since we don't, it hasn't been a priority. If I get a moment I'll at least try to run asciidoc-preview and troubleshoot what's gone wrong.

@savetheclocktower
Copy link
Contributor

OK, the good news is that the fix seems to be pretty easy. If it had been more involved than this I don't know if I would've had the stamina.

I cloned the original repo and ran it locally. I managed to discover that the preview view was being created, but then nothing else was happening. I added one extra function call in the constructor and that seems to have gotten it working for me locally.

@greyp9, revert what I had you do earlier:

pulsar -p uninstall ianwillie/ianasciidocpreview-active-editor-info

Instead, please first uninstall any existing copy of asciidoc-preview you may have installed. Then do this:

pulsar -p install savetheclocktower/atom-asciidoc-preview

This ought to get things working again.

I don't plan to maintain this package, but I don't plan to delete that fork from my repo, either. If you were paranoid, you could fork my fork just to have an archived copy somewhere.

@confused-Techie
Copy link
Member

@savetheclocktower As the original package seems to have been archived, this could be a great use case for pulsar-cooperative, if you think you'd be willing to supply a PR with that fix.

Or otherwise if you're confident in it I can just go through the commit history.

Honestly considering this issue was opened before pulsar-cooperative even existed it seems this might be a great use case. I may make an issue over there to that extent, but I don't want to undo the awesome work by previous commenters working to resolve this issue

@ianwillie
Copy link
Author

Hi everyone,
I have been pondering this and here are a few first thoughts on the subject.
About a year ago I discovered, like others, that atom-asciidoc-preview had stop rendering the preview in that last update of atom & an update of pulsar-edit.
Then I started exploring writing my own package using fairly simple html as I learned about package writing in pulsar-edit. This worked in a limited sort of way.
After that suggested by others, like @confused-Techie, I explored adapting pulsar markdown-preview. It proved remarkably easy to adapt this to render using asciidoctor.js. This relied on using older language packages for rendering and syntax highlighting.
Then there was interest shown by others (like @savetheclocktower & @confused-Techie) in updating markdown-preview with Treesitter grammars & parsers. This was great but broke the package that I was developing. These fine changes to markdown-preview have continued and when these settle a bit then I will fix the package that I was just about to put on github which would preview both markdown and asciidoctor (.adoc) files.

My conclusion (at the moment!) is that fixing atom-asciidoc-preview is great but in the long term it will be far preferable to extend markdown-preview because maintenance will be straightforward after the current version settles down with the Treesitter language tools. atom-asciidoc-preview seems a fairly complex package while markdown-preview is much simpler to comprehend, is uptodate now and will be maintained as a pulsar core package. Relying, for the html generation, on asciidoctor.js which is maintained by the asciidoctor organisation relieves us of the need to maintain that side of it. Almost all configuration can be written into each asciidoctor source file and there is no need for the preview package to handles these. Such configuration includes the likes of table of contents, css file source, choice & management, how security matters are handled (unsafe, server, secure), what highlighter to use (highligh.js, rouge, etc) generally in front matter.

Markdown-preview can easily be extended to have the ability to preview asciidoctor files because I have done it and use it. Alternatively a fork which previewed asciicoctor files but not markdown could be maintained. Again, I have done this and use it. These versions that I have written are programmers version which work and rely on changes being added to code rather than a config file. So, at this point, they are not for public consumption, but are proof of concept. In the near future I will get some of this onto github.

These are first thoughts and I will return and edit this adding details of the source references.

Many thanks to all who have helped me on the way to grasping how to write packages for pulsar-edit.
Kind wishes, Ian.

@dadreggors
Copy link

OK, the good news is that the fix seems to be pretty easy. If it had been more involved than this I don't know if I would've had the stamina.

Instead, please first uninstall any existing copy of asciidoc-preview you may have installed. Then do this:

pulsar -p install savetheclocktower/atom-asciidoc-preview

This ought to get things working again.

This worked on my copy locally.

@ianwillie
Copy link
Author

This worked on my setup too. But I used Package Manager > Install
then entered "savetheclocktower/atom-asciidoc-preview" as the name of the package.

@greyp9
Copy link

greyp9 commented May 21, 2024

This ought to get things working again.

Screenshot 2024-05-21 at 14 56 36

And it does! Thanks very much, @savetheclocktower .

@ianwillie
Copy link
Author

@savetheclocktower
I wonder if the brilliant change that you made adding @attached() to line 24 in .pulsar/packages/asciidoc-preview/lib/asciidoc-preview-view.coffee is in any way related to the bare "super" in

    constructor: ({@editorId, @filePath}) ->
    super
    @emitter = new Emitter
    @disposables = new CompositeDisposable
    @loaded = false
    # NOTE: Don't know why this fixes it. Don't know how `attached` previously
    # got called, because I don't see a code path that would've done it either
    # within this repo or within Pulsar. But it seems to fix the problem.
    @attached()

in some versions of the coffeescript transpiler the bare super produces an error because the latest coffeescript expects "super()" or "super arguments..." and chokes on "super" alone.
I found that using one transpiler, which one I can't remember, but the error stopped the js file being produced at all: "error: unexpected new line" . In another "AsciiDocPreviewView.super.constructor.apply(this, arguments);" was added as expected.

see https://stackoverflow.com/questions/49858400/unexpected-indentation-in-coffee-script and http://coffeescript.org/announcing-coffeescript-2/
"£In CoffeeScript 2, “bare” super (calling super without arguments) is now no longer allowed, and one must use super() or super arguments... instead."

I cannot see how this is connected but it is odd that the transpiling error appears in the same place as your insertion which made the package render properly. Many thanks for that!

I have compiled the package to all JS and it seems to work fine.

@dadreggors
Copy link

@confused-Techie can you give more details on pulsar-cooperative ? Maybe links to docs showing what that even is?

@dadreggors
Copy link

I added this to pulsar-cooperative @confused-Techie, let's see where it goes.

Please feel free to add comments on that issue/request to add this package.

pulsar-cooperative/.github#3

@ianwillie
Copy link
Author

Hi everyone, I have been pondering this and here are a few first thoughts on the subject. About a year ago I discovered, like others, that atom-asciidoc-preview had stop rendering the preview in that last update of atom & an update of pulsar-edit. Then I started exploring writing my own package using fairly simple html as I learned about package writing in pulsar-edit. This worked in a limited sort of way. After that suggested by others, like @confused-Techie, I explored adapting pulsar markdown-preview. It proved remarkably easy to adapt this to render using asciidoctor.js. This relied on using older language packages for rendering and syntax highlighting. Then there was interest shown by others (like @savetheclocktower & @confused-Techie) in updating markdown-preview with Treesitter grammars & parsers. This was great but broke the package that I was developing. These fine changes to markdown-preview have continued and when these settle a bit then I will fix the package that I was just about to put on github which would preview both markdown and asciidoctor (.adoc) files.

My conclusion (at the moment!) is that fixing atom-asciidoc-preview is great but in the long term it will be far preferable to extend markdown-preview because maintenance will be straightforward after the current version settles down with the Treesitter language tools. atom-asciidoc-preview seems a fairly complex package while markdown-preview is much simpler to comprehend, is uptodate now and will be maintained as a pulsar core package. Relying, for the html generation, on asciidoctor.js which is maintained by the asciidoctor organisation relieves us of the need to maintain that side of it. Almost all configuration can be written into each asciidoctor source file and there is no need for the preview package to handles these. Such configuration includes the likes of table of contents, css file source, choice & management, how security matters are handled (unsafe, server, secure), what highlighter to use (highligh.js, rouge, etc) generally in front matter.

Markdown-preview can easily be extended to have the ability to preview asciidoctor files because I have done it and use it. Alternatively a fork which previewed asciicoctor files but not markdown could be maintained. Again, I have done this and use it. These versions that I have written are programmers version which work and rely on changes being added to code rather than a config file. So, at this point, they are not for public consumption, but are proof of concept. In the near future I will get some of this onto github.

These are first thoughts and I will return and edit this adding details of the source references.

Many thanks to all who have helped me on the way to grasping how to write packages for pulsar-edit. Kind wishes, Ian.

@ianwillie
Copy link
Author

ianwillie commented Jul 18, 2024

Hi Folks, I commented in a few posts earlier in May that I thought the way to go would be to modify pulsar markdown-preview to preview asciidoctor. Markdown-preview is an uptodate expertly maintained pulsar bundled package. All that is needed is to adapt it to render the preview using asciidoctor.js which is maintained by asciidoctor.org and relieves pulsar team of that burden. atom-asciidoctor-preview is no longer maintained by asciidoctor.org and I think maintenance will be more difficult than that just suggested.

Well, I have had success in adapting markdown-preview in two different versions 1. which previews only asciidoc files with extensions like .adoc & .ad & 2. a different version which will preview both markdown and asciidoc files.

1.https://github.com/ianwillie/IansascidocPreviewFrommarkdownpreviewnomd/tree/releaseCandidateV0.1.0# on branch: releaseCandidateV0.1.0 branch: releaseCandidateV0.1.0 (NOT main)
https://github.com/ianwillie/IansascidocPreviewFrommarkdownpreviewnomd/archive/refs/heads/releaseCandidateV0.1.0.zip
Once installed preview is operated by ctrl-alt-shft-a and a preview in external browser ctrl-alt-shft-f. NOTE that you should navigate to the "releaseCandidateV0.1.0" branch not "main" to test the package.
See the package README.md for fuller details.

  1. https://github.com/ianwillie/IansascidocPreviewFrommarkdownpreview (note same url as above less terminal "nomd")
    Once installed ctrl-alt-shft-m will operate the preview. Details are in the README.md.

This is very much an alpha proof of concept and the asciidoc only version is fully functional for me in daily use, the other is more buggy but works for me too. I will keep developing these but the recent admirable modernising changes in markdown-preview to the language tools (introduced in version 1.117.0) to update them to treesitter versions & speeding up buffer rendering have proved incompatible with my packages (based on version 1.116.0) for the moment. I will incorporate these changes when I learn more about treesitter language tools. Nonetheless, these two packages presented here based on v1.116.0 work fine for me.

One caveat - this is my second experience of adapting and publishing a package, so there are very many rough edges. These are commented on in the READMEs and the spec tests wait to be adapted to these packages and do not work.
In particular I know how to use local git but getting it all into github in a way that can be downloaded is still a bit of a mystery for me. If anyone sends me pull requests that will be a deepening mystery, for now anyroads.

I am not sure how you would install these packages because they are modified from a core pulsar package which is bundled and I could not fork them from the original. I suggest download the zip file, extract and put a link IansascidocPreviewFrommarkdownpreviewnomd in the pulsar/packages from the directory to the unzipped IansascidocPreviewFrommarkdownpreviewnomd which contains the source code. I work in Manjaro linux so some alterations to the code may be needed for your operating system. The code itself is scattered with comments and commented out sections from the original markdown-preview. There quite a few console.log(): they are verbose but harmless and may help with debugging.

I guess that I should probably put this post somewhere else and there are comments on Discord about the process of maintaining atom-asciidoc-review: https://discord.com/channels/992103415163396136/996581846286618694/1255084745956655146

Many thanks to all of you who have helped me get so far, and encouraged me. Ian
EDITED: correct links to zip file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package-issue This issue is present in a community package, but Puslar is the cause regression Something now broken that worked on Upstream Atom
Projects
None yet
Development

No branches or pull requests

7 participants