1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Merge pull request #310 from Gansgar/master

Added Table of Contents and two small bug fixes
This commit is contained in:
SuenagaRyota
2017-03-09 12:09:50 -08:00
committed by GitHub
3 changed files with 7 additions and 2 deletions

View File

@@ -54,7 +54,6 @@ body
font-family helvetica, arial, sans-serif font-family helvetica, arial, sans-serif
line-height 1.6 line-height 1.6
overflow-x hidden overflow-x hidden
user-select all
background-color $ui-noteDetail-backgroundColor background-color $ui-noteDetail-backgroundColor
.katex .katex
font 400 1.2em 'KaTeX_Main' font 400 1.2em 'KaTeX_Main'
@@ -78,7 +77,6 @@ body
li li
label.taskListItem label.taskListItem
margin-left -2em margin-left -2em
background-color white
div.math-rendered div.math-rendered
text-align center text-align center
.math-failed .math-failed
@@ -184,6 +182,8 @@ ul
list-style-type circle list-style-type circle
&>li>ul &>li>ul
list-style-type square list-style-type square
ul.markdownIt-TOC, ul.markdownIt-TOC ul
list-style-type none
ol ol
list-style-type decimal list-style-type decimal
padding-left 2em padding-left 2em

View File

@@ -1,6 +1,7 @@
import markdownit from 'markdown-it' import markdownit from 'markdown-it'
import emoji from 'markdown-it-emoji' import emoji from 'markdown-it-emoji'
import math from '@rokt33r/markdown-it-math' import math from '@rokt33r/markdown-it-math'
import tocAndAnchor from "markdown-it-toc-and-anchor"
import _ from 'lodash' import _ from 'lodash'
const katex = window.katex const katex = window.katex
@@ -36,6 +37,9 @@ var md = markdownit({
md.use(emoji, { md.use(emoji, {
shortcuts: {} shortcuts: {}
}) })
md.use(tocAndAnchor, {
anchorLink: false
})
md.use(math, { md.use(math, {
inlineRenderer: function (str) { inlineRenderer: function (str) {
let output = '' let output = ''

View File

@@ -61,6 +61,7 @@
"markdown-it-checkbox": "^1.1.0", "markdown-it-checkbox": "^1.1.0",
"markdown-it-emoji": "^1.1.1", "markdown-it-emoji": "^1.1.1",
"markdown-it-footnote": "^3.0.0", "markdown-it-footnote": "^3.0.0",
"markdown-it-toc-and-anchor": "^4.1.1",
"md5": "^2.0.0", "md5": "^2.0.0",
"mixpanel": "^0.4.1", "mixpanel": "^0.4.1",
"moment": "^2.10.3", "moment": "^2.10.3",