gitlab-glfm-markdown 0.0.35-x86_64-linux-musl → 0.0.36-x86_64-linux-musl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Cargo.lock +1 -1
- data/ext/glfm_markdown/Cargo.lock +1 -1
- data/ext/glfm_markdown/Cargo.toml +1 -1
- data/ext/glfm_markdown/src/formatter.rs +1 -43
- data/lib/glfm_markdown/3.1/glfm_markdown.so +0 -0
- data/lib/glfm_markdown/3.2/glfm_markdown.so +0 -0
- data/lib/glfm_markdown/3.3/glfm_markdown.so +0 -0
- data/lib/glfm_markdown/3.4/glfm_markdown.so +0 -0
- data/lib/glfm_markdown/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d0b4ee011d8f4cab77433f54d917dd9a49bf774bdb28096d9e8c6132b2ccef0
|
4
|
+
data.tar.gz: 640ab6bd9d7ebdc1c416464e1ea0a7234980bf79b1204246d0cf72180d9ee4a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '080fb3b3b2cec715c1def1945addc3a388942df8dab42e4aa2af2c4fd269ed6db88f8a0f9f1b22a5c74ba9ab59e301aa56a6f996195fdf8fb8704950b89c98b3'
|
7
|
+
data.tar.gz: 8b73ab5c269037c1a8fbb3e48a349739c82b92fe4bb86dd23586e6c64900cdc8e045fd7a136e350a82abbb160445075c6d96f5595d5d3b928362fc1af155c31e
|
data/Cargo.lock
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[package]
|
2
2
|
name = "glfm_markdown"
|
3
|
-
version = "0.0.
|
3
|
+
version = "0.0.36"
|
4
4
|
edition = "2021"
|
5
5
|
authors = ["digitalmoksha <bwalker@gitlab.com>", "Asherah Connor <aconnor@gitlab.com>"]
|
6
6
|
description = "GitLab Flavored Markdown parser and formatter. 100% CommonMark-compatible. Experimental."
|
@@ -1,6 +1,6 @@
|
|
1
1
|
use std::fmt::{self, Write};
|
2
2
|
|
3
|
-
use comrak::html::{
|
3
|
+
use comrak::html::{render_sourcepos, ChildRendering, Context};
|
4
4
|
use comrak::nodes::{AstNode, ListType, NodeValue};
|
5
5
|
use comrak::{create_formatter, html};
|
6
6
|
use lazy_static::lazy_static;
|
@@ -43,9 +43,6 @@ create_formatter!(CustomFormatter<RenderUserData>, {
|
|
43
43
|
NodeValue::TaskItem(_) => |context, node, entering| {
|
44
44
|
return render_task_item(context, node, entering);
|
45
45
|
},
|
46
|
-
NodeValue::Heading(_) => |context, node, entering| {
|
47
|
-
return render_heading(context, node, entering);
|
48
|
-
},
|
49
46
|
NodeValue::Escaped => |context, node, entering| {
|
50
47
|
return render_escaped(context, node, entering);
|
51
48
|
},
|
@@ -312,45 +309,6 @@ fn render_text<'a>(
|
|
312
309
|
Ok(ChildRendering::HTML)
|
313
310
|
}
|
314
311
|
|
315
|
-
fn render_heading<'a>(
|
316
|
-
context: &mut Context<RenderUserData>,
|
317
|
-
node: &'a AstNode<'a>,
|
318
|
-
entering: bool,
|
319
|
-
) -> Result<ChildRendering, fmt::Error> {
|
320
|
-
let NodeValue::Heading(ref nh) = node.data.borrow().value else {
|
321
|
-
unreachable!()
|
322
|
-
};
|
323
|
-
|
324
|
-
match context.plugins.render.heading_adapter {
|
325
|
-
None => {
|
326
|
-
// Overrides the default handling in order to render the heading text
|
327
|
-
// inside the anchor tag to better support screen readers
|
328
|
-
if entering {
|
329
|
-
context.cr()?;
|
330
|
-
write!(context, "<h{}", nh.level)?;
|
331
|
-
render_sourcepos(context, node)?;
|
332
|
-
context.write_str(">")?;
|
333
|
-
|
334
|
-
if let Some(ref prefix) = context.options.extension.header_ids {
|
335
|
-
let text_content = collect_text(node);
|
336
|
-
let id = context.anchorizer.anchorize(&text_content);
|
337
|
-
write!(
|
338
|
-
context,
|
339
|
-
r##"<a href="#{id}" class="anchor" id="{prefix}{id}">"##
|
340
|
-
)?;
|
341
|
-
}
|
342
|
-
} else {
|
343
|
-
if context.options.extension.header_ids.is_some() {
|
344
|
-
write!(context, "</a>")?;
|
345
|
-
}
|
346
|
-
writeln!(context, "</h{}>", nh.level)?;
|
347
|
-
}
|
348
|
-
Ok(ChildRendering::HTML)
|
349
|
-
}
|
350
|
-
Some(_adapter) => format_node_default(context, node, entering),
|
351
|
-
}
|
352
|
-
}
|
353
|
-
|
354
312
|
fn render_escaped<'a>(
|
355
313
|
context: &mut Context<RenderUserData>,
|
356
314
|
node: &'a AstNode<'a>,
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-glfm-markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.36
|
5
5
|
platform: x86_64-linux-musl
|
6
6
|
authors:
|
7
7
|
- Brett Walker
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rb_sys
|