From 8ab66ba51e43976ae57c27dbf1587bd68ff67735 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 15 Aug 2010 16:49:58 +0000 Subject: [PATCH] Fix some comment issues in the boostbook syntax highlighter. [SVN r64833] --- .../more/tests/syntax-highlight/comments.gold | 26 +++++++++++ test/more/tests/syntax-highlight/comments.xml | 24 +++++++++++ xsl/source-highlight.xsl | 43 +++++++++++++------ 3 files changed, 81 insertions(+), 12 deletions(-) create mode 100644 test/more/tests/syntax-highlight/comments.gold create mode 100644 test/more/tests/syntax-highlight/comments.xml diff --git a/test/more/tests/syntax-highlight/comments.gold b/test/more/tests/syntax-highlight/comments.gold new file mode 100644 index 0000000..a2b1633 --- /dev/null +++ b/test/more/tests/syntax-highlight/comments.gold @@ -0,0 +1,26 @@ + +
Header <<ulink url="../../example.hpp">example.hpp</ulink>> + Fake reference documentation, so that the syntax highlighter will kick in. + + +foo + + + Macro foo3foo// In header: <example.hpp> + +fooDescription + /* C style comment */ + /* Broken C style comment + +/* Multi-line + *comment + */ + /*/ Tricky comment */ + /**/ + /***/ + // Single line comment + // Single line comment + + + +
\ No newline at end of file diff --git a/test/more/tests/syntax-highlight/comments.xml b/test/more/tests/syntax-highlight/comments.xml new file mode 100644 index 0000000..276205b --- /dev/null +++ b/test/more/tests/syntax-highlight/comments.xml @@ -0,0 +1,24 @@ + +
+ + Fake reference documentation, so that the syntax highlighter will kick in. + + + + + /* C style comment */ + /* Broken C style comment + +/* Multi-line + *comment + */ + /*/ Tricky comment */ + /**/ + /***/ + // Single line comment + // Single line comment + + + + +
diff --git a/xsl/source-highlight.xsl b/xsl/source-highlight.xsl index 03894c6..b3903e5 100644 --- a/xsl/source-highlight.xsl +++ b/xsl/source-highlight.xsl @@ -363,20 +363,39 @@ - - - - - - + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + +