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

converting markdown into AsciiDoc - wrong conversion of links #1170

Open
aisbergde opened this issue Sep 25, 2022 · 5 comments
Open

converting markdown into AsciiDoc - wrong conversion of links #1170

aisbergde opened this issue Sep 25, 2022 · 5 comments
Labels

Comments

@aisbergde
Copy link

Observed vs. expected behavior

After converting markdown into Adoc the plugin shows errors.

Original (markdown)

What we're looking at today:

*   [Obsidian](#obsidian)
*   [GitJournal](#gitjournal)
*   [Markor](#markor)
*   [iA Writer](#ia-writer)
*   [Other apps of interest](#other-apps-of-interest)
    *   [Markdown notes](#markdown-notes)
    *   [Git clients](#git-clients)
*   [Last thoughts](#final-thoughts)

Obsidian
--------

converted (adoc)

What we're looking at today:

* <<obsidian,Obsidian>>
* <<gitjournal,GitJournal>>
* <<markor,Markor>>
* <<ia-writer,iA Writer>>
* <<other-apps-of-interest,Other apps of interest>>
** <<markdown-notes,Markdown notes>>
** <<git-clients,Git clients>>
* <<final-thoughts,Last thoughts>>

== Obsidian

image

but this would work:

* <<iA Writer>>
* <<Other apps of interest>>

maybe it would be better to assign explicit anchor id to section titles:

[#obsidian]
== Obsidian

I think, the conversion mixes natural cross reference with another kind of anchoring

@aisbergde aisbergde added the bug label Sep 25, 2022
@aisbergde
Copy link
Author

aisbergde commented Sep 25, 2022

I think this is a kramdown error, kramdown also generates wrong content

@ahus1
Copy link
Contributor

ahus1 commented Oct 2, 2022

The conversion in this plugin is done via https://github.com/bodiam/markdown-to-asciidoc and not kramdown.

I see that this was discussed in the kramdown project, and that the other issue now closed. I close this one as well as I assume the settings about how to generate IDs would apply here as well.

@ahus1 ahus1 closed this as completed Oct 2, 2022
@mojavelinux
Copy link
Member

I assume the settings about how to generate IDs would apply here as well.

Partially. It's true that you could adjust idprefix and idseparator once the Markdown document is converted so that the AsciiDoc processor generates IDs that conform. However, markdown-to-asciidoc does not support control over ID generation coming from the Markdown document as kramdoc provides.

@aisbergde
Copy link
Author

for the plugin I have not yet a solution, because I can't set any paramerts, but I can click only the context menu item.

@ahus1
Copy link
Contributor

ahus1 commented Oct 2, 2022

Thanks for the comments, I re-open the issue. Still, I don't have a solution for that at hand.

@ahus1 ahus1 reopened this Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants