From 621284b2a53e6d1c87beb195467927bc4e0ae920 Mon Sep 17 00:00:00 2001 From: matsuda0528 Date: Wed, 7 Jul 2021 15:52:15 +0900 Subject: [PATCH] Fix to display bullet correctly --- app/assets/stylesheets/scaffolds.scss | 7 ++++++- lib/markdown_converter.rb | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/scaffolds.scss b/app/assets/stylesheets/scaffolds.scss index 1d133eb..c75cc47 100644 --- a/app/assets/stylesheets/scaffolds.scss +++ b/app/assets/stylesheets/scaffolds.scss @@ -48,6 +48,11 @@ li.bullet-list-item { text-indent: -2.4em; } +li.ul_list_item { + margin-left: 0px; + text-indent: 0em; +} + .bullet-list-marker { font-family: monospace !important; font-weight: normal; @@ -134,4 +139,4 @@ div { .marked { background-color: #fff44f !important; -} \ No newline at end of file +} diff --git a/lib/markdown_converter.rb b/lib/markdown_converter.rb index 6d021f5..3489d10 100644 --- a/lib/markdown_converter.rb +++ b/lib/markdown_converter.rb @@ -566,7 +566,11 @@ def make_xref(el) # # def convert_li(el, indent) - output = ' '*indent << "<#{el.type}" << html_attributes(el.attr) << ">" + if el.value + output = ' '*indent << "<#{el.type}" << html_attributes(el.attr) << ">" + elsif + output = ' '*indent << "<#{el.type}" << " class=\"ul_list_item\"" << html_attributes(el.attr) << ">" + end if el.value.respond_to?(:mark) output << "(#{el.value.mark})"