Skip to content

Commit 398ab8e

Browse files
committed
---
yaml --- r: 82639 b: refs/heads/auto c: 35c0cdf h: refs/heads/master i: 82637: 155fd5d 82635: b3d0edf 82631: 7b2cf02 82623: 0873d7f v: v3
1 parent 163525c commit 398ab8e

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 3585c64d092082ab2aa16a6d674d063c5d68e1a8
16+
refs/heads/auto: 35c0cdff5a5fc9e41468ce167c9304ba43028ac4
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustdoc/html/markdown.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ use std::vec;
1818
pub struct Markdown<'self>(&'self str);
1919

2020
static OUTPUT_UNIT: libc::size_t = 64;
21+
static MKDEXT_NO_INTRA_EMPHASIS: libc::c_uint = 1 << 0;
22+
static MKDEXT_TABLES: libc::c_uint = 1 << 1;
23+
static MKDEXT_FENCED_CODE: libc::c_uint = 1 << 2;
24+
static MKDEXT_AUTOLINK: libc::c_uint = 1 << 3;
25+
static MKDEXT_STRIKETHROUGH: libc::c_uint = 1 << 4;
26+
static MKDEXT_SPACE_HEADERS: libc::c_uint = 1 << 6;
27+
static MKDEXT_SUPERSCRIPT: libc::c_uint = 1 << 7;
28+
static MKDEXT_LAX_SPACING: libc::c_uint = 1 << 8;
2129

2230
type sd_markdown = libc::c_void; // this is opaque to us
2331

@@ -67,6 +75,9 @@ fn render(w: &mut io::Writer, s: &str) {
6775
// This code is all lifted from examples/sundown.c in the sundown repo
6876
unsafe {
6977
let ob = bufnew(OUTPUT_UNIT);
78+
let extensions = MKDEXT_NO_INTRA_EMPHASIS | MKDEXT_TABLES |
79+
MKDEXT_FENCED_CODE | MKDEXT_AUTOLINK |
80+
MKDEXT_STRIKETHROUGH;
7081
let options = html_renderopt {
7182
toc_data: html_toc_data {
7283
header_count: 0,
@@ -79,7 +90,7 @@ fn render(w: &mut io::Writer, s: &str) {
7990
let callbacks: sd_callbacks = [0, ..26];
8091

8192
sdhtml_renderer(&callbacks, &options, 0);
82-
let markdown = sd_markdown_new(0, 16, &callbacks,
93+
let markdown = sd_markdown_new(extensions, 16, &callbacks,
8394
&options as *html_renderopt as *libc::c_void);
8495

8596
do s.as_imm_buf |data, len| {

0 commit comments

Comments
 (0)