commonmarker 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/commonmarker/src/node.rs +20 -0
- 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: 0ea9527eceec73a2bab7247ca87911f0f41d0d24ed4615e21ee314e2f3d6bc2d
|
4
|
+
data.tar.gz: 6f66c38930a2d218b6295a5f689619691975b93a03074978e0751a74592c3613
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cc98dc04146e884b0b91e62d53b56cdc1fb2a1739705a18a523015a44d88b85550264c7d008bff5ba0262cd2ac9e09d014e8bec190a195c5d88ce4ab61eddd1
|
7
|
+
data.tar.gz: 29ddab6152567bff92f769b70bb5be476a4bda05202c03fd8b0a3b3eef2754e32524f854d19db73e530349b742de242419bc27192dcac0eee1a1eb8412b83460
|
@@ -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;
|
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.2
|
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-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rb_sys
|