Giter VIP home page Giter VIP logo

Comments (11)

hunyadi avatar hunyadi commented on August 14, 2024

md2conf is depending on the Python package markdown for parsing Markdown sources. If the package markdown fails to correctly parse the document, it can lead to a malformed HTML document tree, which in turn can show up as an ill-formatted wiki document in Confluence.

Let's take a look at your sample input on the left-hand side:

- **`user_id`** *(string)*: Id of the user.

However, from what I can see, even the engine that generated the sample output on the right-hand side seems to be having trouble with formatting, specifically, the bold formatting instruction on the monospace text appears to have been completely ignored.

I suggest somewhat simplifying the input, and see if that produces the right visual output in Confluence. Could you share a minimal example that works, and another small incremental update that barely does not? Thanks in advance! This can help pinpoint the exact context where the markdown parser gets into trouble, and we may be able to report it to markdown authors.

from md2conf.

albertocarrf avatar albertocarrf commented on August 14, 2024

Hey, I tried removing everything but a couple of lines and I can't make it work it seems the parser introduces a lot of new lines and spaces that shouldn't be there:

Captura de pantalla 2023-08-30 a las 9 45 28

Captura de pantalla 2023-08-30 a las 9 45 46

Captura de pantalla 2023-08-30 a las 9 46 35

This is the library version I'm using
Markdown 3.4.4

from md2conf.

hunyadi avatar hunyadi commented on August 14, 2024

I have extended sample/example.md with additional examples:

An ordered list:

1. *List item 1*
2. **List item 2**
spanning multiple text file lines but rendered as a single line
3. _List item 3_
4. `List item 4`

A bullet point list:

* *List item 1*
* **List item 2**
spanning multiple text file lines but rendered as a single line
* _List item 3_
* `List item 4`

An unordered list:

- *List item 1*
- **List item 2**
spanning multiple text file lines but rendered as a single line
- _List item 3_
- `List item 4`

All of these work as expected in Confluence.

However, your example has the following snippet, which not all Markdown implementations allow because technically you can't make a monospace text bold (and the bold instruction is being ignored in all the sample output you shared).

**`user_id`**

Can you try a simpler version, e.g.

- `user_id` *(string)*: Id of the user.

Likewise, can you share an example that works (cutting down on all formatting instructions), and another that barely does not?

from md2conf.

albertocarrf avatar albertocarrf commented on August 14, 2024

Captura de pantalla 2023-08-30 a las 11 52 33
(the markdown code you provide)

Ok so it seems the markdown version I have doesn't work with code blocks, which one are you using? Any other library that could affect? Mine is:
Markdown 3.4.4

from md2conf.

hunyadi avatar hunyadi commented on August 14, 2024

I have the following Python packages installed that are dependencies for md2conf:

  • lxml 4.9.3
  • Markdown 3.4.4
  • pymdown-extensions 10.2
  • requests 2.31.0

I am no Confluence expert but the Confluence version might also have a say in how the content is displayed. Identical Confluence Storage Format documents might be rendered differently in versions of Confluence.

from md2conf.

albertocarrf avatar albertocarrf commented on August 14, 2024

We have Confluence cloud, I will check the version and I will let you know

from md2conf.

albertocarrf avatar albertocarrf commented on August 14, 2024

I'm doing some tests and it seems code blocks with `` , cursive with ** and items in unordered lists add a new line every time you set a character:

  • item
    translates into:
  • item

cursive
translates into:
(new line)
cursive text
(newline)

code block
translates into:
(new line)
code blocked
(new line)

Captura de pantalla 2023-08-30 a las 12 35 18
Captura de pantalla 2023-08-30 a las 12 35 00

Confluence cloud version:
Confluence 1000.0.0-732f22cda01f

from md2conf.

hunyadi avatar hunyadi commented on August 14, 2024

I will add debugging features to md2conf to save the generated Confluence Storage Format (CSF) document before it is uploaded to Confluence. This would help us pin down the issue and tell if it's related to how the Python package markdown parses the Markdown document, or to how Confluence understands the uploaded CSF document.

from md2conf.

albertocarrf avatar albertocarrf commented on August 14, 2024

Oh, that sounds nice, thank you so much!
Whenever you have just ping me here and we will test

from md2conf.

hunyadi avatar hunyadi commented on August 14, 2024

Since the latest commit to branch master, md2conf would print the generated Confluence Storage Format document in debug mode:

python3 -m md2conf --loglevel=debug sample/example.md

If you can share the Markdown source document and log output, we can track down what the likely root cause of the formatting error is.

from md2conf.

albertocarrf avatar albertocarrf commented on August 14, 2024

Captura de pantalla 2023-08-30 a las 14 58 09
nvm, it seems to be working now 😅

from md2conf.

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.