Skip to content

Commit

Permalink
Don't duplicate custom-content section descriptions.
Browse files Browse the repository at this point in the history
Fixed edge-case bug in custom content where a `description` that doesn't terminate in `.` gave duplicate section descriptions.
  • Loading branch information
ewels committed Apr 4, 2022
1 parent 45ce9ae commit ea18493
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Improvements for running MultiQC in a Python environment, such as a Jupyter Notebook or script
- Fixed bug raised when removing logging file handlers between calls that arose when configuring the root logger with dictConfig ([#1643](https://github.com/ewels/MultiQC/issues/1643))
- Added new config option `custom_table_header_config` to override any config for any table header
- Fixed edge-case bug in custom content where a `description` that doesn't terminate in `.` gave duplicate section descriptions.

### New Modules

Expand Down
2 changes: 1 addition & 1 deletion multiqc/modules/custom_content/custom_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def add_cc_section(self, c_id, mod):
# Don't use exactly the same title / description text as the main module
if section_name == self.name:
section_name = None
if section_description == self.info:
if section_description.strip(".") == self.info.strip("."):
section_description = ""

self.add_section(name=section_name, anchor=c_id, description=section_description, plot=plot, content=content)
Expand Down

0 comments on commit ea18493

Please sign in to comment.