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

[BUG] Extra <br/> added for every line #17

Open
revati-naik opened this issue Mar 20, 2024 · 4 comments
Open

[BUG] Extra <br/> added for every line #17

revati-naik opened this issue Mar 20, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@revati-naik
Copy link

Describe the bug
A clear and concise description of what the bug is.
The markdown file generated has multiple
entries that cause multiple new rows to be added.

I am using this extension along with sphinx and sphinx-needs

To Reproduce
Steps to reproduce the behavior:

  1. Clone '...'
  2. Install packages '....'
  3. Run '....'
  4. See error

This is how the markdown file entry looks like


| Software Requirement: **The package shall detect dropped messages.** [SWRQ_SYSTEM_MONITOR_422](#SWRQ_SYSTEM_MONITOR_422)<br/><br/>                                                                                                             |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| integrity: ASIL-D<br/><br/><br/>has_dead_links: True<br/><br/><br/>has_forbidden_dead_links: True<br/><br/><br/><br/><br/>links outgoing: OUT_1<br/><br/><br/><br/> |
| Some text message.                                                        |

Expected behavior
A clear and concise description of what you expected to happen.
I am not sure what this should look like. But when converting the above markdown to HTML using mkdocs, it comes up funny. Like a lot of rows/spaces added.

Could we have this fixed?

Environment (please complete the following information):

  • OS: [e.g. iOS] - Linux
  • Version [e.g. 22] - Ubuntu 220.4

Additional context
Add any other context about the problem here.

@revati-naik revati-naik added the bug Something isn't working label Mar 20, 2024
@revati-naik
Copy link
Author

revati-naik commented Mar 21, 2024

I could fix it partly by changing

replace("\n", "<br/>")

With

replace("\n", "")

on line

return ["".join(entries).replace("\n", "<br/>") for entries in row]

@liran-funaro
Copy link
Owner

Hi @revati-naik.
Please try to create a minimalistic example to reproduce this issue.

@revati-naik
Copy link
Author

Hi,
Please find the below versions to be included in the reproduction of this bug

Describe the bug

When writing a .rst file,

.. swrq:: The package package shall detect dropped messages.
    :id: SWRQ_SYSTEM_MONITOR_422
    :integrity: ASIL-D
    :links: LINK_!, LINK2

   Description of the above requirement

When using the sphinx markdown builder, I see an output as below


| Software Requirement: **The package shall detect dropped messages.** [SWRQ_SYSTEM_MONITOR_422](#SWRQ_SYSTEM_MONITOR_422)<br/><br/>                                                                                                             |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| integrity: ASIL-D<br/><br/><br/>has_dead_links: True<br/><br/><br/>has_forbidden_dead_links: True<br/><br/><br/><br/><br/>links outgoing: OUT_1<br/><br/><br/><br/> |
| Some text message.                                                        |

This has multiple instances of <br/> inserted.

This causes issues later on for markdown parsers. On making the change as mentioned above, I was able to get rid of a few <br/> but not all. So my table rows have a lot of spacing in them when I render in HTML using mkdocs. Also, there are multiple blank rows.

To Reproduce
Steps to reproduce the behavior:

Create an rst file like above
Convert it to markdown with this plugin
See similar output in markdown
Expected behavior

One `
anchor should be enough per new row.

Environment (please complete the following information):

OS: Ubuntu
Version: 22.04
Additional context
Add any other context about the problem here.

@liran-funaro
Copy link
Owner

This is the intended behaviour. I don't see any issue with this. Can you provide the HTML output of that same document for reference?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants