[ 
https://issues.apache.org/jira/browse/CAMEL-12422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16426509#comment-16426509
 ] 

ASF GitHub Bot commented on CAMEL-12422:
----------------------------------------

oscerd closed pull request #2280: CAMEL-12422 Fixed language declaration for 
code snippets in documenta…
URL: https://github.com/apache/camel/pull/2280
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/components/camel-csv/src/main/docs/csv-dataformat.adoc 
b/components/camel-csv/src/main/docs/csv-dataformat.adoc
index bae6f163f18..6cd2d973038 100644
--- a/components/camel-csv/src/main/docs/csv-dataformat.adoc
+++ b/components/camel-csv/src/main/docs/csv-dataformat.adoc
@@ -89,12 +89,12 @@ or this XML route definition
 </route>
 -------------------------------------------------------
 
+
 then it will produce 
 
-[source,java]
--------------------------------------------------------
+----
 abc,123
--------------------------------------------------------
+----
 
 ### Unmarshalling a CSV message into a Java List
 
@@ -178,6 +178,7 @@ body.put("foo", "abc");
 body.put("bar", 123);
 ------------------------------------------------------- 
 
+
 and this Java route definition 
 
 [source,java]
@@ -210,7 +211,6 @@ or this XML route definition
 
 then it will produce 
 
-[source,java]
 -------------------------------------------------------
 abc|123
 ------------------------------------------------------- 
@@ -358,7 +358,7 @@ If you use Maven you can just add the following to your 
pom.xml,
 substituting the version number for the latest and greatest release (see
 the download page for the latest versions).
 
-[source,java]
+[source,xml]
 -------------------------------------
 <dependency>
   <groupId>org.apache.camel</groupId>
diff --git a/components/camel-mail/src/main/docs/mime-multipart-dataformat.adoc 
b/components/camel-mail/src/main/docs/mime-multipart-dataformat.adoc
index d7cf6a9ea43..49fbe2638e4 100644
--- a/components/camel-mail/src/main/docs/mime-multipart-dataformat.adoc
+++ b/components/camel-mail/src/main/docs/mime-multipart-dataformat.adoc
@@ -116,7 +116,6 @@ Message with the following message Camel headers:
 
 *Camel Message Headers*
 
-[source,java]
 -------------------------------------------------------------------------------
 Content-Type=multipart/mixed; \n boundary="----=_Part_0_14180567.1447658227051"
 Message-Id=<...>
@@ -129,7 +128,6 @@ The message body will be:
 
 *Camel Message Body*
 
-[source,java]
 ----------------------------------------------------------------
 ------=_Part_0_14180567.1447658227051
 Content-Type: application/octet-stream
@@ -158,7 +156,6 @@ original message starting with "x-" and the header with 
name "included":
 
 *Camel Message Body*
 
-[source,java]
 ----------------------------------------------------------------
 Message-ID: <...>
 MIME-Version: 1.0
diff --git 
a/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc 
b/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc
index d51fef7091f..6b005a47b1c 100644
--- 
a/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc
+++ 
b/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc
@@ -18,7 +18,6 @@ for this component:
 
 ### URI format
 
-[source,java]
 ------------------------------------------------------------------------------
 
mongodb-gridfs:connectionBean?database=databaseName&bucket=bucketName[&moreOptions...]
 ------------------------------------------------------------------------------
@@ -121,8 +120,7 @@ The following route defined in Spring XML executes the 
operation
 #### count
 
 Returns the total number of file in the collection, returning an Integer
-as the OUT message body. +
- +
+as the OUT message body.
 
 [source,java]
 
---------------------------------------------------------------------------------
@@ -146,7 +144,6 @@ Integer count = 
template.requestBodyAndHeaders("direct:count", query, headers);
 Returns an Reader that lists all the filenames and their IDs in a tab
 separated stream.
 
-[source,java]
 
----------------------------------------------------------------------------------
 // 
from("direct:listAll").to("mongodb-gridfs?database=tickets&operation=listAll");
 Reader result = template.requestBodyAndHeader("direct:listAll", 
"irrelevantBody");
diff --git a/components/camel-snmp/src/main/docs/snmp-component.adoc 
b/components/camel-snmp/src/main/docs/snmp-component.adoc
index 9298f77ca20..e80f4657103 100644
--- a/components/camel-snmp/src/main/docs/snmp-component.adoc
+++ b/components/camel-snmp/src/main/docs/snmp-component.adoc
@@ -21,7 +21,6 @@ for this component:
 
 ### URI format
 
-[source,java]
 --------------------------------
 snmp://hostname[:port][?Options]
 --------------------------------
@@ -118,7 +117,6 @@ Given the situation, that I poll for the following OIDs:
 
 *OIDs*
 
-[source,java]
 -------------------------
 1.3.6.1.2.1.1.3.0
 1.3.6.1.2.1.25.3.2.1.5.1
@@ -167,14 +165,12 @@ requested...be prepared.
 
 Polling a remote device:
 
-[source,java]
 ---------------------------------------------------------------------
 snmp:192.168.178.23:161?protocol=udp&type=POLL&oids=1.3.6.1.2.1.1.5.0
 ---------------------------------------------------------------------
 
 Setting up a trap receiver (*Note that no OID info is needed here!*):
 
-[source,java]
 -----------------------------------------
 snmp:127.0.0.1:162?protocol=udp&type=TRAP
 -----------------------------------------


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Wrong language syntax declarations for code samples in documentation
> --------------------------------------------------------------------
>
>                 Key: CAMEL-12422
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12422
>             Project: Camel
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 2.21.1
>            Reporter: Fintan Bolton
>            Priority: Major
>
> AsciiDoc has the ability to support syntax highlighting, which can be enabled 
> by putting the following line before a code sample (e.g. for Java code):
> {code:java}
> [source,java]{code}
> However, there are some places in the documentation where this declaration is 
> used, but the code sample that follows is _not_ Java. This can cause 
> incorrect syntax highlighting or (more seriously) can sometimes cause a 
> documentation build to crash. The following doc files are affected:
> * {{csv-dataformat.adoc}}
> * {{mime-multipart-dataformat.adoc}}
> * {{mongodb-gridfs-component.adoc}}
> * {{snmp-component.adoc}}
> I plan to submit a PR to fix these files.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to