From 094e4c5da82b869a383c8a5e98847ea84edf9698 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Mon, 27 Aug 2018 02:41:56 +0200 Subject: [PATCH 1/6] add support to abbreviations, subscript text, superscript text and definition lists --- browser/components/markdown.styl | 55 ++++++- browser/lib/markdown-it-deflist.js | 221 +++++++++++++++++++++++++++++ browser/lib/markdown.js | 4 + package.json | 3 + yarn.lock | 12 ++ 5 files changed, 294 insertions(+), 1 deletion(-) create mode 100644 browser/lib/markdown-it-deflist.js diff --git a/browser/components/markdown.styl b/browser/components/markdown.styl index 03503231..4f326e08 100644 --- a/browser/components/markdown.styl +++ b/browser/components/markdown.styl @@ -371,6 +371,35 @@ for name, val in admonition_types color: val[color] content: val[icon] +dl + margin 2em 0 + padding 0 + display flex + width 100% + flex-wrap wrap + align-items flex-start + border-bottom 1px solid borderColor + background-color tableHeadBgColor + +dt + border-top 1px solid borderColor + font-weight bold + text-align right + overflow hidden + flex-basis 18% + padding 1% + +dd + border-top 1px solid borderColor + flex-basis 78% + max-width 78% + padding 1% + min-height 1.55em + background-color $ui-noteDetail-backgroundColor + +dd + dd + margin-left 20% + themeDarkBackground = darken(#21252B, 10%) themeDarkText = #f9f9f9 themeDarkBorder = lighten(themeDarkBackground, 20%) @@ -421,6 +450,14 @@ body[data-theme="dark"] kbd background-color themeDarkBorder color themeDarkText + dl + border-color themeDarkBorder + background-color themeDarkTableHead + dt + border-color themeDarkBorder + dd + border-color themeDarkBorder + background-color themeDarkPreview themeSolarizedDarkTableOdd = $ui-solarized-dark-noteDetail-backgroundColor themeSolarizedDarkTableEven = darken($ui-solarized-dark-noteDetail-backgroundColor, 10%) @@ -448,6 +485,14 @@ body[data-theme="solarized-dark"] border-color themeSolarizedDarkTableBorder &:last-child border-right solid 1px themeSolarizedDarkTableBorder + dl + border-color themeDarkBorder + background-color themeSolarizedDarkTableHead + dt + border-color themeDarkBorder + dd + border-color themeDarkBorder + background-color $ui-solarized-dark-noteDetail-backgroundColor themeMonokaiTableOdd = $ui-monokai-noteDetail-backgroundColor themeMonokaiTableEven = darken($ui-monokai-noteDetail-backgroundColor, 10%) @@ -476,4 +521,12 @@ body[data-theme="monokai"] &:last-child border-right solid 1px themeMonokaiTableBorder kbd - background-color themeDarkBackground \ No newline at end of file + background-color themeDarkBackground + dl + border-color themeDarkBorder + background-color themeMonokaiTableHead + dt + border-color themeDarkBorder + dd + border-color themeDarkBorder + background-color $ui-monokai-noteDetail-backgroundColor \ No newline at end of file diff --git a/browser/lib/markdown-it-deflist.js b/browser/lib/markdown-it-deflist.js new file mode 100644 index 00000000..5dd02267 --- /dev/null +++ b/browser/lib/markdown-it-deflist.js @@ -0,0 +1,221 @@ +'use strict' + +module.exports = function definitionListPlugin (md) { + var isSpace = md.utils.isSpace + + // Search `[:~][\n ]`, returns next pos after marker on success + // or -1 on fail. + function skipMarker (state, line) { + let start = state.bMarks[line] + state.tShift[line] + const max = state.eMarks[line] + + if (start >= max) { return -1 } + + // Check bullet + const marker = state.src.charCodeAt(start++) + if (marker !== 0x7E/* ~ */ && marker !== 0x3A/* : */) { return -1 } + + const pos = state.skipSpaces(start) + + // require space after ":" + if (start === pos) { return -1 } + + return start + } + + function markTightParagraphs (state, idx) { + const level = state.level + 2 + + let i + let l + for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) { + if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') { + state.tokens[i + 2].hidden = true + state.tokens[i].hidden = true + i += 2 + } + } + } + + function deflist (state, startLine, endLine, silent) { + var ch, + contentStart, + ddLine, + dtLine, + itemLines, + listLines, + listTokIdx, + max, + nextLine, + offset, + oldDDIndent, + oldIndent, + oldParentType, + oldSCount, + oldTShift, + oldTight, + pos, + prevEmptyEnd, + tight, + token + + if (silent) { + // quirk: validation mode validates a dd block only, not a whole deflist + if (state.ddIndent < 0) { return false } + return skipMarker(state, startLine) >= 0 + } + + nextLine = startLine + 1 + if (nextLine >= endLine) { return false } + + if (state.isEmpty(nextLine)) { + nextLine++ + if (nextLine >= endLine) { return false } + } + + if (state.sCount[nextLine] < state.blkIndent) { return false } + contentStart = skipMarker(state, nextLine) + if (contentStart < 0) { return false } + + // Start list + listTokIdx = state.tokens.length + tight = true + + token = state.push('dl_open', 'dl', 1) + token.map = listLines = [ startLine, 0 ] + + // + // Iterate list items + // + + dtLine = startLine + ddLine = nextLine + + // One definition list can contain multiple DTs, + // and one DT can be followed by multiple DDs. + // + // Thus, there is two loops here, and label is + // needed to break out of the second one + // + /* eslint no-labels:0,block-scoped-var:0 */ + OUTER: + for (;;) { + prevEmptyEnd = false + + token = state.push('dt_open', 'dt', 1) + token.map = [ dtLine, dtLine ] + + token = state.push('inline', '', 0) + token.map = [ dtLine, dtLine ] + token.content = state.getLines(dtLine, dtLine + 1, state.blkIndent, false).trim() + token.children = [] + + token = state.push('dt_close', 'dt', -1) + + for (;;) { + token = state.push('dd_open', 'dd', 1) + token.map = itemLines = [ nextLine, 0 ] + + pos = contentStart + max = state.eMarks[ddLine] + offset = state.sCount[ddLine] + contentStart - (state.bMarks[ddLine] + state.tShift[ddLine]) + + while (pos < max) { + ch = state.src.charCodeAt(pos) + + if (isSpace(ch)) { + if (ch === 0x09) { + offset += 4 - offset % 4 + } else { + offset++ + } + } else { + break + } + + pos++ + } + + contentStart = pos + + oldTight = state.tight + oldDDIndent = state.ddIndent + oldIndent = state.blkIndent + oldTShift = state.tShift[ddLine] + oldSCount = state.sCount[ddLine] + oldParentType = state.parentType + state.blkIndent = state.ddIndent = state.sCount[ddLine] + 2 + state.tShift[ddLine] = contentStart - state.bMarks[ddLine] + state.sCount[ddLine] = offset + state.tight = true + state.parentType = 'deflist' + + state.md.block.tokenize(state, ddLine, endLine, true) + + // If any of list item is tight, mark list as tight + if (!state.tight || prevEmptyEnd) { + tight = false + } + // Item become loose if finish with empty line, + // but we should filter last element, because it means list finish + prevEmptyEnd = (state.line - ddLine) > 1 && state.isEmpty(state.line - 1) + + state.tShift[ddLine] = oldTShift + state.sCount[ddLine] = oldSCount + state.tight = oldTight + state.parentType = oldParentType + state.blkIndent = oldIndent + state.ddIndent = oldDDIndent + + token = state.push('dd_close', 'dd', -1) + + itemLines[1] = nextLine = state.line + + if (nextLine >= endLine) { break OUTER } + + if (state.sCount[nextLine] < state.blkIndent) { break OUTER } + contentStart = skipMarker(state, nextLine) + if (contentStart < 0) { break } + + ddLine = nextLine + + // go to the next loop iteration: + // insert DD tag and repeat checking + } + + if (nextLine >= endLine) { break } + dtLine = nextLine + + if (state.isEmpty(dtLine)) { break } + if (state.sCount[dtLine] < state.blkIndent) { break } + + ddLine = dtLine + 1 + if (ddLine >= endLine) { break } + if (state.isEmpty(ddLine)) { ddLine++ } + if (ddLine >= endLine) { break } + + if (state.sCount[ddLine] < state.blkIndent) { break } + contentStart = skipMarker(state, ddLine) + if (contentStart < 0) { break } + + // go to the next loop iteration: + // insert DT and DD tags and repeat checking + } + + // Finilize list + token = state.push('dl_close', 'dl', -1) + + listLines[1] = nextLine + + state.line = nextLine + + // mark paragraphs tight if needed + if (tight) { + markTightParagraphs(state, listTokIdx) + } + + return true + } + + md.block.ruler.before('paragraph', 'deflist', deflist, { alt: [ 'paragraph', 'reference' ] }) +} diff --git a/browser/lib/markdown.js b/browser/lib/markdown.js index 49fd2f86..a3e230af 100644 --- a/browser/lib/markdown.js +++ b/browser/lib/markdown.js @@ -149,6 +149,10 @@ class Markdown { }) this.md.use(require('markdown-it-kbd')) this.md.use(require('markdown-it-admonition')) + this.md.use(require('markdown-it-abbr')) + this.md.use(require('markdown-it-sub')) + this.md.use(require('markdown-it-sup')) + this.md.use(require('./markdown-it-deflist')) const deflate = require('markdown-it-plantuml/lib/deflate') this.md.use(require('markdown-it-plantuml'), '', { diff --git a/package.json b/package.json index e9949adf..ee814f3b 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "lodash": "^4.11.1", "lodash-move": "^1.1.1", "markdown-it": "^6.0.1", + "markdown-it-abbr": "^1.0.4", "markdown-it-admonition": "^1.0.4", "markdown-it-emoji": "^1.1.1", "markdown-it-footnote": "^3.0.0", @@ -80,6 +81,8 @@ "markdown-it-named-headers": "^0.0.4", "markdown-it-plantuml": "^1.1.0", "markdown-it-smartarrows": "^1.0.1", + "markdown-it-sub": "^1.0.0", + "markdown-it-sup": "^1.0.0", "mdurl": "^1.0.1", "mermaid": "^8.0.0-rc.8", "moment": "^2.10.3", diff --git a/yarn.lock b/yarn.lock index 4ecfa51b..d32f1520 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5723,6 +5723,10 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" +markdown-it-abbr@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/markdown-it-abbr/-/markdown-it-abbr-1.0.4.tgz#d66b5364521cbb3dd8aa59dadfba2fb6865c8fd8" + markdown-it-admonition@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/markdown-it-admonition/-/markdown-it-admonition-1.0.4.tgz#d7bbc7eb1fe6168fc8cc304de7a9d8c993acb2f5" @@ -5763,6 +5767,14 @@ markdown-it-smartarrows@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/markdown-it-smartarrows/-/markdown-it-smartarrows-1.0.1.tgz#b570e9c0ff9812e0db6ace19afa5ba12b64bb9a7" +markdown-it-sub@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz#375fd6026eae7ddcb012497f6411195ea1e3afe8" + +markdown-it-sup@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/markdown-it-sup/-/markdown-it-sup-1.0.0.tgz#cb9c9ff91a5255ac08f3fd3d63286e15df0a1fc3" + markdown-it@^5.0.3: version "5.1.0" resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-5.1.0.tgz#25286b8465bac496f3f1b77eed544643e9bd718d" From 646151e02081850df4b916a619540b9e3e6c735f Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Mon, 27 Aug 2018 19:12:28 +0200 Subject: [PATCH 2/6] allows compact definition lists --- browser/lib/markdown-it-deflist.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/browser/lib/markdown-it-deflist.js b/browser/lib/markdown-it-deflist.js index 5dd02267..d0cdb656 100644 --- a/browser/lib/markdown-it-deflist.js +++ b/browser/lib/markdown-it-deflist.js @@ -46,10 +46,12 @@ module.exports = function definitionListPlugin (md) { listLines, listTokIdx, max, + newEndLine, nextLine, offset, oldDDIndent, oldIndent, + oldLineMax, oldParentType, oldSCount, oldTShift, @@ -150,7 +152,16 @@ module.exports = function definitionListPlugin (md) { state.tight = true state.parentType = 'deflist' - state.md.block.tokenize(state, ddLine, endLine, true) + newEndLine = ddLine + while (++newEndLine < endLine && (state.sCount[newEndLine] >= state.sCount[ddLine] || state.isEmpty(newEndLine))) { + } + + oldLineMax = state.lineMax + state.lineMax = newEndLine + + state.md.block.tokenize(state, ddLine, newEndLine, true) + + state.lineMax = oldLineMax // If any of list item is tight, mark list as tight if (!state.tight || prevEmptyEnd) { From f57c4f390d5546393f4473485f4f03281140be35 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Mon, 27 Aug 2018 23:16:21 +0200 Subject: [PATCH 3/6] fix lint errors --- browser/lib/markdown-it-deflist.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/browser/lib/markdown-it-deflist.js b/browser/lib/markdown-it-deflist.js index d0cdb656..f3c58009 100644 --- a/browser/lib/markdown-it-deflist.js +++ b/browser/lib/markdown-it-deflist.js @@ -155,12 +155,12 @@ module.exports = function definitionListPlugin (md) { newEndLine = ddLine while (++newEndLine < endLine && (state.sCount[newEndLine] >= state.sCount[ddLine] || state.isEmpty(newEndLine))) { } - + oldLineMax = state.lineMax state.lineMax = newEndLine - + state.md.block.tokenize(state, ddLine, newEndLine, true) - + state.lineMax = oldLineMax // If any of list item is tight, mark list as tight From 49db1c8244c4ff80185b3f6b4a0a5531d78fb6b7 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Sat, 8 Sep 2018 19:28:06 +0200 Subject: [PATCH 4/6] fix style to match table padding --- browser/components/markdown.styl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/browser/components/markdown.styl b/browser/components/markdown.styl index d6b541d7..15f89f89 100644 --- a/browser/components/markdown.styl +++ b/browser/components/markdown.styl @@ -361,7 +361,7 @@ for name, val in admonition_types .admonition.{name} @extend $admonition border-left-color: val[color] - + .admonition.{name}>.admonition-title @extend $admonition-title border-bottom-color: .1rem solid rgba(val[color], 0.2) @@ -387,16 +387,17 @@ dt font-weight bold text-align right overflow hidden - flex-basis 18% - padding 1% + flex-basis 20% + padding 6px 13px + box-sizing border-box dd border-top 1px solid borderColor - flex-basis 78% - max-width 78% - padding 1% - min-height 1.55em + flex-basis 80% + padding 6px 13px + min-height 2.5em background-color $ui-noteDetail-backgroundColor + box-sizing border-box dd + dd margin-left 20% From 76928e43a317651501615aa9c9b5089835912753 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Mon, 17 Sep 2018 22:46:20 +0200 Subject: [PATCH 5/6] - add `data-line` attribute to definition lists and lists - add tests --- browser/lib/markdown-it-deflist.js | 2 +- browser/lib/markdown.js | 7 +- tests/fixtures/markdowns.js | 59 ++++++++++++++- tests/lib/markdown-test.js | 20 +++++ tests/lib/snapshots/markdown-test.js.md | 88 ++++++++++++++++++---- tests/lib/snapshots/markdown-test.js.snap | Bin 1724 -> 2265 bytes 6 files changed, 156 insertions(+), 20 deletions(-) diff --git a/browser/lib/markdown-it-deflist.js b/browser/lib/markdown-it-deflist.js index f3c58009..db14c636 100644 --- a/browser/lib/markdown-it-deflist.js +++ b/browser/lib/markdown-it-deflist.js @@ -116,7 +116,7 @@ module.exports = function definitionListPlugin (md) { for (;;) { token = state.push('dd_open', 'dd', 1) - token.map = itemLines = [ nextLine, 0 ] + token.map = itemLines = [ ddLine, 0 ] pos = contentStart max = state.eMarks[ddLine] diff --git a/browser/lib/markdown.js b/browser/lib/markdown.js index 6420f215..81a1ed67 100644 --- a/browser/lib/markdown.js +++ b/browser/lib/markdown.js @@ -251,9 +251,12 @@ class Markdown { this.md.renderer.render = (tokens, options, env) => { tokens.forEach((token) => { switch (token.type) { - case 'heading_open': - case 'paragraph_open': case 'blockquote_open': + case 'dd_open': + case 'dt_open': + case 'heading_open': + case 'list_item_open': + case 'paragraph_open': case 'table_open': token.attrPush(['data-line', token.map[0]]) } diff --git a/tests/fixtures/markdowns.js b/tests/fixtures/markdowns.js index 69e335e0..e261f231 100644 --- a/tests/fixtures/markdowns.js +++ b/tests/fixtures/markdowns.js @@ -50,11 +50,68 @@ const smartQuotes = 'This is a "QUOTE".' const breaks = 'This is the first line.\nThis is the second line.' +const abbrevations = ` +## abbr + +The HTML specification +is maintained by the W3C. + +*[HTML]: Hyper Text Markup Language +*[W3C]: World Wide Web Consortium +` + +const subTexts = ` +## sub + +H~2~0 +` + +const supTexts = ` +## sup + +29^th^ +` + +const deflists = ` +## definition list + +### list 1 + +Term 1 + ~ Definition 1 + +Term 2 + ~ Definition 2a + ~ Definition 2b + +Term 3 +~ + + +### list 2 + +Term 1 + +: Definition 1 + +Term 2 with *inline markup* + +: Definition 2 + + { some code, part of Definition 2 } + + Third paragraph of definition 2. +` + export default { basic, codeblock, katex, checkboxes, smartQuotes, - breaks + breaks, + abbrevations, + subTexts, + supTexts, + deflists } diff --git a/tests/lib/markdown-test.js b/tests/lib/markdown-test.js index 73b68799..e9fb8fc2 100644 --- a/tests/lib/markdown-test.js +++ b/tests/lib/markdown-test.js @@ -43,3 +43,23 @@ test('Markdown.render() should render line breaks correctly', t => { const renderedNonBreaks = newmd.render(markdownFixtures.breaks) t.snapshot(renderedNonBreaks) }) + +test('Markdown.render() should renders abbrevations correctly', t => { + const rendered = md.render(markdownFixtures.abbrevations) + t.snapshot(rendered) +}) + +test('Markdown.render() should renders sub correctly', t => { + const rendered = md.render(markdownFixtures.subTexts) + t.snapshot(rendered) +}) + +test('Markdown.render() should renders sup correctly', t => { + const rendered = md.render(markdownFixtures.supTexts) + t.snapshot(rendered) +}) + +test('Markdown.render() should renders definition lists correctly', t => { + const rendered = md.render(markdownFixtures.deflists) + t.snapshot(rendered) +}) diff --git a/tests/lib/snapshots/markdown-test.js.md b/tests/lib/snapshots/markdown-test.js.md index ffc3d699..b020b098 100644 --- a/tests/lib/snapshots/markdown-test.js.md +++ b/tests/lib/snapshots/markdown-test.js.md @@ -25,13 +25,22 @@ Generated by [AVA](https://ava.li). `c=pmsqrta2+b2c = pmsqrt{a^2 + b^2}␊ ` +## Markdown.render() should renders abbrevations correctly + +> Snapshot 1 + + `

abbr

␊ +

The HTML specification
␊ + is maintained by the W3C.

␊ + ` + ## Markdown.render() should renders checkboxes > Snapshot 1 `
    ␊ -
  • Unchecked
  • ␊ -
  • Checked
  • ␊ +
  • Unchecked
  • ␊ +
  • Checked
␊ ` @@ -43,6 +52,37 @@ Generated by [AVA](https://ava.li). ␊ ` +## Markdown.render() should renders definition lists correctly + +> Snapshot 1 + + `

definition list

␊ +

list 1

␊ +
␊ +
Term 1
␊ +
Definition 1
␊ +
Term 2
␊ +
Definition 2a
␊ +
Definition 2b
␊ +
␊ +

Term 3
␊ + ~

␊ +

list 2

␊ +
␊ +
Term 1
␊ +
␊ +

Definition 1

␊ +
␊ +
Term 2 with inline markup
␊ +
␊ +

Definition 2

␊ +
  { some code, part of Definition 2 }␊
+    
␊ +

Third paragraph of definition 2.

␊ +
␊ +
␊ + ` + ## Markdown.render() should renders markdown correctly > Snapshot 1 @@ -52,31 +92,47 @@ Generated by [AVA](https://ava.li).

Docs 📝


Article Archive 📚


Community 🍻

␊ ` +## Markdown.render() should renders sub correctly + +> Snapshot 1 + + `

sub

␊ +

H20

␊ + ` + +## Markdown.render() should renders sup correctly + +> Snapshot 1 + + `

sup

␊ +

29th

␊ + ` + ## Markdown.render() should text with quotes correctly > Snapshot 1 diff --git a/tests/lib/snapshots/markdown-test.js.snap b/tests/lib/snap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9w5L-LXcDU$0|#XsbUzN`-6-XW z8@8%Ytr=CHNslwg*9;L&$ztum0p`+xSdai=I(u15Z7~4~X<}4W5!PBL)6z*vwUE-f zVfXedt4gagG|eJd%hc*TXCbNy$yv1EbYyCFM(8^4Ck*dzXM}CK| z>>rM390M=ScJ6?!kE+j+ecf>{ji={*l1u8rR+{9VPnSve(VsM(jEgd^>H_bq)de6x zm&!uWw#(tc{fClq(|Lk4RPWmpEd*5f>tshYIIb0RhWJVkd72122Rj_&=!U?&Xa#KA zS50KSx~&1W7_Wfs$KYBo+8RYDk7c(C3&SK*jW0`ob!KEr-60)1B>weJHkkOy01x<=(_yBdji+Gu5f1`=2zOBP}W=;Tuz0^gLXZrZbB@xN%q$J;GTM_eb7yJO5~!01Ht!Jvc6C8XgBI=Zu?9O+fZK+(aUO|=1#}c>-c^86AOT*-LwtsVoAab#(7H2f- zg!xM3tEGI!^Oek2DXK_fO~n~CQaK7$hB6j&9?Fb$MBP4&ZpEgV?TOp}KRlR2-kkKP2334z#89k;|lHVLwc% zP#mj{jjq5{0Y=@N5O`o==;hHat5_&ajE;`3YQV*!-{%m9J*1+ia2CBmN?L*^0m)s0 zNpu0OGoHm)9`E^7S2Z7U0$Z{EFB|C&C|*}0TvuXX*XWj5#p7aSteU#H^iL7Wok01z zUdq)Z2Go14Er18&z)2K|+o!h-SF*I^Kx%(G*3^w24Xv1o!t}YzsuW743h?^#Gu9=a z8HxuU!g67J^;1XBsQH`2y(=yFL3Sebte{XT-GRxrs}N! zs*!beko*4*`Y(3S`mf$`;$x#T`*j?VSTyG#srw`e!ABa!aQn!13_*K7@tQ6>oer3t zUslfKyHJO=-tQ}%Vp Svl~TT8}l!i*8=N#6951$K|E{# From 8f290c2a6ddc9787d97d7d1f5b7b21282ae9f84a Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Thu, 8 Nov 2018 06:22:12 +0100 Subject: [PATCH 6/6] rounding paddings --- browser/components/markdown.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/components/markdown.styl b/browser/components/markdown.styl index 74fb56de..b7f219b8 100644 --- a/browser/components/markdown.styl +++ b/browser/components/markdown.styl @@ -389,13 +389,13 @@ dt text-align right overflow hidden flex-basis 20% - padding 0.43rem 0.93rem + padding 0.4rem 0.9rem box-sizing border-box dd border-top 1px solid borderColor flex-basis 80% - padding 0.43rem 0.93rem + padding 0.4rem 0.9rem min-height 2.5rem background-color $ui-noteDetail-backgroundColor box-sizing border-box