Comments (11)
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.
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:
This is the library version I'm using
Markdown 3.4.4
from md2conf.
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.
(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.
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.
We have Confluence cloud, I will check the version and I will let you know
from md2conf.
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)
Confluence cloud version:
Confluence 1000.0.0-732f22cda01f
from md2conf.
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.
Oh, that sounds nice, thank you so much!
Whenever you have just ping me here and we will test
from md2conf.
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.
nvm, it seems to be working now 😅
from md2conf.
Related Issues (20)
- Enable URL auto-linking HOT 3
- Setting the Confluence space doesn't work HOT 3
- Make sub-items/nested lists work HOT 1
- Is it possible to create under a certain page instead of the root space? HOT 1
- Fail to update page with attached image. It tries to upload it again HOT 1
- Support "Info Panel" (incl. all other derivates) in text HOT 2
- "unable to find matching page for URL: {url}" HOT 2
- Links from ./foo/bar.md to ../baz/foo-bar.md issues HOT 4
- Relative links to gitlab files HOT 4
- Error: Confluence returns a format that is not JSON as expected HOT 9
- only convert, do not publish? HOT 3
- warning and notes appear to render incorrectly HOT 2
- Is there any way to export a subfolder as a file? HOT 4
- Ignore parts of the markdown HOT 2
- md2conf for cloud hosted Confluence HOT 1
- Markdown validator HOT 8
- Pictures in a subfolder don't show HOT 2
- Invalid href with local url HOT 1
- Improve internal links (=header anchors) handling HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from md2conf.