commonmarker 1.1.1 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Cargo.lock +2 -2
- data/ext/commonmarker/src/node.rs +20 -3
- data/lib/commonmarker/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: dcfe5afe736de6389674b8f9dde0ce59c2ef47edad89941fbe484a041bc86897
|
4
|
+
data.tar.gz: 581c06aee0a9045226dfe92e5fedd1625b9d5c9f8ffdff373930c660426398b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 966b17cd354ce4e7798b66eca2c73a6363db0a9a3091160614b29cd1b48e1647b4c2b2dd0583dc5ddddf18acd045a99f19ac7505c93132d68a5975aeaa81e716
|
7
|
+
data.tar.gz: 7b78bfd01e7b53840fe9cd700ca7421320ede39a2cc53ab0edf2cb3def80fe09c8a8bf23b322a8e775b3b45eae8f45496b5f46beedbb3d3e2dca1140f7e0c20a
|
data/Cargo.lock
CHANGED
@@ -517,9 +517,9 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
|
|
517
517
|
|
518
518
|
[[package]]
|
519
519
|
name = "magnus"
|
520
|
-
version = "0.6.
|
520
|
+
version = "0.6.4"
|
521
521
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
522
|
-
checksum = "
|
522
|
+
checksum = "b1597ef40aa8c36be098249e82c9a20cf7199278ac1c1a1a995eeead6a184479"
|
523
523
|
dependencies = [
|
524
524
|
"magnus-macros",
|
525
525
|
"rb-sys",
|
@@ -669,6 +669,14 @@ impl CommonmarkerNode {
|
|
669
669
|
fn get_string_content(&self) -> Result<String, magnus::Error> {
|
670
670
|
let node = self.inner.borrow();
|
671
671
|
|
672
|
+
match node.data.value {
|
673
|
+
ComrakNodeValue::Code(ref code) => return Ok(code.literal.to_string()),
|
674
|
+
ComrakNodeValue::CodeBlock(ref code_block) => {
|
675
|
+
return Ok(code_block.literal.to_string())
|
676
|
+
}
|
677
|
+
_ => {}
|
678
|
+
}
|
679
|
+
|
672
680
|
match node.data.value.text() {
|
673
681
|
Some(s) => Ok(s.to_string()),
|
674
682
|
None => Err(magnus::Error::new(
|
@@ -681,6 +689,18 @@ impl CommonmarkerNode {
|
|
681
689
|
fn set_string_content(&self, new_content: String) -> Result<bool, magnus::Error> {
|
682
690
|
let mut node = self.inner.borrow_mut();
|
683
691
|
|
692
|
+
match node.data.value {
|
693
|
+
ComrakNodeValue::Code(ref mut code) => {
|
694
|
+
code.literal = new_content;
|
695
|
+
return Ok(true);
|
696
|
+
}
|
697
|
+
ComrakNodeValue::CodeBlock(ref mut code_block) => {
|
698
|
+
code_block.literal = new_content;
|
699
|
+
return Ok(true);
|
700
|
+
}
|
701
|
+
_ => {}
|
702
|
+
}
|
703
|
+
|
684
704
|
match node.data.value.text_mut() {
|
685
705
|
Some(s) => {
|
686
706
|
*s = new_content;
|
@@ -1088,8 +1108,5 @@ pub fn init(m_commonmarker: RModule) -> Result<(), magnus::Error> {
|
|
1088
1108
|
c_node.define_method("fence_info", method!(CommonmarkerNode::get_fence_info, 0))?;
|
1089
1109
|
c_node.define_method("fence_info=", method!(CommonmarkerNode::set_fence_info, 1))?;
|
1090
1110
|
|
1091
|
-
c_node.define_method("fence_info", method!(CommonmarkerNode::get_fence_info, 0))?;
|
1092
|
-
c_node.define_method("fence_info=", method!(CommonmarkerNode::set_fence_info, 1))?;
|
1093
|
-
|
1094
1111
|
Ok(())
|
1095
1112
|
}
|
data/lib/commonmarker/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commonmarker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-05-
|
12
|
+
date: 2024-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rb_sys
|