mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Removed the useless margin below the description text in Parts table
This fixes issue #192
This commit is contained in:
parent
6ce6b97b1e
commit
c3f4e61e41
2 changed files with 8 additions and 3 deletions
|
@ -743,6 +743,10 @@ th.select-checkbox {
|
|||
margin-right: 0.2em;
|
||||
}
|
||||
|
||||
.markdown-inline p {
|
||||
margin-block-end: 0;
|
||||
}
|
||||
|
||||
/*********************************
|
||||
Workarounds
|
||||
*********************************/
|
||||
|
|
|
@ -61,14 +61,15 @@ class MarkdownParser
|
|||
* The rendering of markdown is done on client side.
|
||||
*
|
||||
* @param string $markdown the markdown text that should be parsed to html
|
||||
* @param bool $inline_mode Only allow inline markdown codes like (*bold* or **italic**), not something like tables
|
||||
* @param bool $inline_mode When true, p blocks will have no margins behind them
|
||||
*
|
||||
* @return string the markdown in a version that can be parsed on client side
|
||||
*/
|
||||
public function markForRendering(string $markdown, bool $inline_mode = false): string
|
||||
{
|
||||
return sprintf(
|
||||
'<div class="markdown" data-markdown="%s" data-controller="common--markdown">%s</div>',
|
||||
'<div class="markdown %s" data-markdown="%s" data-controller="common--markdown">%s</div>',
|
||||
$inline_mode ? 'markdown-inline' : '', //Add class if inline mode is enabled, to prevent margin after p
|
||||
htmlspecialchars($markdown),
|
||||
$this->translator->trans('markdown.loading')
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue