You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2015/07/08 18:19:18 UTC
[3/3] lucy-clownfish git commit: No POD escapes needed in code blocks
No POD escapes needed in code blocks
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/8d82f9ad
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/8d82f9ad
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/8d82f9ad
Branch: refs/heads/master
Commit: 8d82f9adcc98ae0866d203eef53ea94a53b66955
Parents: e275a6c
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Jul 8 15:47:21 2015 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Jul 8 18:16:40 2015 +0200
----------------------------------------------------------------------
compiler/src/CFCPerlPod.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/8d82f9ad/compiler/src/CFCPerlPod.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlPod.c b/compiler/src/CFCPerlPod.c
index 17315df..bc99a6a 100644
--- a/compiler/src/CFCPerlPod.c
+++ b/compiler/src/CFCPerlPod.c
@@ -382,17 +382,17 @@ S_nodes_to_pod(cmark_node *node, CFCClass *klass, int header_level) {
case CMARK_NODE_CODE_BLOCK: {
const char *content = cmark_node_get_literal(node);
- char *escaped = S_pod_escape(content);
+ char *copy = CFCUtil_strdup(content);
// Chomp trailing newline.
- size_t len = strlen(escaped);
- if (len > 0 && escaped[len-1] == '\n') {
- escaped[len-1] = '\0';
+ size_t len = strlen(copy);
+ if (len > 0 && copy[len-1] == '\n') {
+ copy[len-1] = '\0';
}
char *indented
- = CFCUtil_global_replace(escaped, "\n", "\n ");
+ = CFCUtil_global_replace(copy, "\n", "\n ");
result = CFCUtil_cat(result, " ", indented, "\n\n", NULL);
FREEMEM(indented);
- FREEMEM(escaped);
+ FREEMEM(copy);
break;
}