Scan-o-Matic / scanomatic

Scanomatic
GNU General Public License v3.0
10 stars 4 forks source link

Markdown support for descriptions #384

Closed local-minimum closed 6 years ago

local-minimum commented 6 years ago

screenshot from 2018-05-08 12-14-56

Doesn't support headings (probably good since it would break layout without some css considerations). Supports sub and super scripting. Applies to both project and experiment descriptions.

codecov-io commented 6 years ago

Codecov Report

Merging #384 into master will increase coverage by 0.02%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #384      +/-   ##
==========================================
+ Coverage   40.72%   40.75%   +0.02%     
==========================================
  Files         198      199       +1     
  Lines       16855    16858       +3     
  Branches     2942     2942              
==========================================
+ Hits         6865     6870       +5     
+ Misses       9575     9554      -21     
- Partials      415      434      +19
Impacted Files Coverage Δ
.../ui_server_data/js/src/components/ProjectPanel.jsx 100% <ø> (ø) :arrow_up:
...r_data/js/src/components/ExperimentPanel/index.jsx 96.96% <ø> (ø) :arrow_up:
...omatic/ui_server_data/js/src/components/Markup.jsx 100% <100%> (ø)
scanomatic/ui_server/data_api.py 9.65% <0%> (ø) :arrow_up:
scanomatic/qc/phenotype_results.py 0% <0%> (ø) :arrow_up:
scanomatic/io/source.py 18.08% <0%> (ø) :arrow_up:
scanomatic/data_processing/phases/features.py 17.23% <0%> (ø) :arrow_up:
scanomatic/ui_server/tools_api.py 8.77% <0%> (ø) :arrow_up:
scanomatic/data_processing/phenotyper.py 27.51% <0%> (ø) :arrow_up:
scanomatic/ui_server/general.py 22.41% <0%> (ø) :arrow_up:
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f2e1643...7eb0362. Read the comment docs.

local-minimum commented 6 years ago

The solution needs setting dangerous html but markdown-it should be safe since the markdown module is not set to allow html-tags:

https://markdown-it.github.io/markdown-it/#MarkdownIt.new

local-minimum commented 6 years ago

I did this to see what your thought were on it and you might be right that <pre> is sufficient for now. I thought this markdown package did sanatize, but you are right we'd probably want to check it if we decided to do it... I'll close this PR and one of us make's the descriptions <pre> and make sure it looks decent.