Commit graph

12 commits

Author SHA1 Message Date
Yangshun Tay
e8e3f42685
ESLintify Part 1 (#837)
* ESLint-ify

* Allow empty try/catch

* Escape regexp
2018-07-08 09:13:18 -07:00
Endilie Yacop Sucipto
21dcea2a31
Integrate eslint & precommit to codebase (#815)
* add eslint, precommit & refactor

* fix exit code 127

* modify contributing.md & add package-lock

* use .eslintrc.js
2018-07-01 12:27:31 +08:00
Yangshun Tay
545a053289 Add Facebook copyright headers (#633) 2018-05-04 09:40:07 -07:00
Tom Auger
2d7274f6fe Blog feed fixes #370 (#407)
* Refactor markdown rendering into separate module

* Render blog feed description in html
2018-02-11 08:05:58 -08:00
Héctor Ramos
65421db62e Add Prettier Formatting (#258)
* Add Prettier formatting to source files and example files, and check that Prettier formatting is maintained on PRs

* Remove trailing-comma as we are using Node 6 on Circle

* Use latest Node 6 LTS version in Circle

* Remove unused test
2017-12-04 19:21:02 -08:00
Christopher Chedeau
d5f26a52d4 Add the ability to render html and linkify links (#208)
Marked had the ability to display html code. This is useful if you want to embed iframes, set size to images... This allows arbitrary html to be embedded with no sanitization, so `<script>alert()</script>` will be executed. This isn't such a big issue since the markdown is written only by contributors.

I also removed the componentWillUpdate call since it's not used (and wrong).
2017-11-01 13:40:00 -07:00
Christopher Chedeau
e9c5cef664 Add the ability to define a default language (#206)
* Add the ability to define a default language

I don't want to have to add the language i'm working on to every single block nor do I want to rely on a default heuristic to find the language.

This adds the ability to write

```
highlight: { defaultLang: 'xxxx' }
```

in `siteConfig.js` to force the language when not specified.

I tested it without a a highlight block, without a defaultLang attribute and with one and with a wrong one. All of them work as expected.

* Move comment around
2017-11-01 12:16:15 -07:00
Héctor Ramos
73b9a1128b Switch to GFM-style heading anchors (#164) 2017-10-26 16:12:17 -07:00
Hector Ramos
9bb4f906fc Use RegExp with global flag to ensure all fenced code blocks have the hljs class applied 2017-10-26 12:14:46 -07:00
Héctor Ramos
fb294ab845 [markdown] Remove client-side syntax highlighting (#189)
* Remove client side highlighting

* Update CSS rules to render plain code blocks with expected left border

* Add back codeColor background color config

* Ensure all pre code blocks use Highlight.js classes
2017-10-26 12:07:02 -07:00
Héctor Ramos
49034dd6bb Fix Remarkable case issue (#166) 2017-10-24 10:49:13 -07:00
Héctor Ramos
b832176dc6 [markdown] Switch to Remarkable (#153)
* Switch to Remarkable
* Clean up references to custom code blocks
* Remove valdiateDOMNesting warning
* Add syntax highlighting
* Add Reason support
* Breaking change: prismColor to codeColor, remove CompLibrary.Prism, expose hljs
* Completely remove Prism and associated CSS rules
* Support loading plugins and scripts
* Remove CSS rules, allowing Highlight.js theme to be used entirely
* Remove unnecessary webplayer script
2017-10-24 09:45:21 -07:00