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

add doc role when the asciidoc page is used in an antora context #845

Merged
merged 4 commits into from
Feb 8, 2024

Conversation

lask79
Copy link
Contributor

@lask79 lask79 commented Feb 4, 2024

Resolves #844

@ggrossetie
Copy link
Member

Would you be able to add a test case in https://github.com/asciidoctor/asciidoctor-vscode/blob/master/src/test/asciidoctorWebViewConverter.test.ts to test with and without an antoraDocumentContext?

@lask79
Copy link
Contributor Author

lask79 commented Feb 4, 2024

Sure I will try to do that

lask79 and others added 2 commits February 4, 2024 13:54
Co-authored-by: Guillaume Grossetie <ggrossetie@yuzutech.fr>
@lask79
Copy link
Contributor Author

lask79 commented Feb 4, 2024

I added testcases but I cannot test them locally so please run the test and tell me if there needs to be changed something.

I am getting the following error when I run the tests (independent from my change):
Exit code: SIGTRAP

I am currently woring on a WSL2 - Ubuntu Image with VSCode Remote Development. Maybe that is related.

@lask79
Copy link
Contributor Author

lask79 commented Feb 4, 2024

Ok, I am now able to run the Tests using the debugger. Now I have to figure out to test the content div. I will take a look later.

@ggrossetie
Copy link
Member

ggrossetie commented Feb 4, 2024

The reason is that we are using const html = processor.convert(input, { converter: asciidoctorWebViewConverter }). In this case, Asciidoctor will convert inline markup: https://docs.asciidoctor.org/asciidoctor/latest/api/convert-strings/#convert-inline-markup-only

You should create a new test case to convert a standalone document: https://docs.asciidoctor.org/asciidoctor/latest/api/convert-strings/#standalone-output

const html = processor.convert(input, { converter: asciidoctorWebViewConverter, standalone: true })

@lask79
Copy link
Contributor Author

lask79 commented Feb 4, 2024

fixed tests

@lask79
Copy link
Contributor Author

lask79 commented Feb 7, 2024

@ggrossetie Is anything missing from my side to merge this?

@ggrossetie
Copy link
Member

No all good 👍🏻

@ggrossetie ggrossetie merged commit 595fc27 into asciidoctor:master Feb 8, 2024
2 checks passed
ggrossetie added a commit to ggrossetie/asciidoctor-vscode that referenced this pull request Feb 8, 2024
…iidoctor#845)

Co-authored-by: Guillaume Grossetie <ggrossetie@yuzutech.fr>
Co-authored-by: Lasse Knudsen <lasse.knudsen@siemens.com>
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

Successfully merging this pull request may close these issues.

Improve antora experience by putting a doc div into generated preview html
3 participants