diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-12-04 20:11:05 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-12-04 20:11:05 (GMT) |
commit | 540f0b66972c03fd53c97174e1680230b8dd4026 (patch) | |
tree | 8e7c4a64fe02e84f12a72bd840dbb9b2d91b2614 | |
parent | 33cdac235fa71cf3ee60127810cac9e5d79f9f4b (diff) | |
parent | a4cf65dea1371721f07c63c2bb5f9e5085b2618a (diff) | |
download | Doxygen-540f0b66972c03fd53c97174e1680230b8dd4026.zip Doxygen-540f0b66972c03fd53c97174e1680230b8dd4026.tar.gz Doxygen-540f0b66972c03fd53c97174e1680230b8dd4026.tar.bz2 |
Merge pull request #254 from kbinani/language_switch_command
Fix bug: language switch command skipped when langauge id contains "-" letter
-rw-r--r-- | src/commentscan.l | 4 | ||||
-rw-r--r-- | testing/065/indexpage.xml | 10 | ||||
-rw-r--r-- | testing/065_tilde.dox | 12 |
3 files changed, 24 insertions, 2 deletions
diff --git a/src/commentscan.l b/src/commentscan.l index 3bfd563..702a616 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -1120,7 +1120,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" <Comment>{B}*("\\\\"|"@@")"f"[$\[{] { // escaped formula command addOutput(yytext); } -<Comment>{B}*{CMD}"~"[a-z_A-Z]* { // language switch command +<Comment>{B}*{CMD}"~"[a-z_A-Z-]* { // language switch command QCString langId = QString(yytext).stripWhiteSpace().data()+2; if (!langId.isEmpty() && qstricmp(Config_getEnum("OUTPUT_LANGUAGE"),langId)!=0) @@ -2160,7 +2160,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" /* ----- handle language specific sections ------- */ -<SkipLang>[\\@]"~"[a-zA-Z]* { /* language switch */ +<SkipLang>[\\@]"~"[a-zA-Z-]* { /* language switch */ QCString langId = &yytext[2]; if (langId.isEmpty() || qstricmp(Config_getEnum("OUTPUT_LANGUAGE"),langId)==0) diff --git a/testing/065/indexpage.xml b/testing/065/indexpage.xml new file mode 100644 index 0000000..e462e55 --- /dev/null +++ b/testing/065/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>これは日本語(en)です. Output for all languages. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/065_tilde.dox b/testing/065_tilde.dox new file mode 100644 index 0000000..0b4986f --- /dev/null +++ b/testing/065_tilde.dox @@ -0,0 +1,12 @@ +// objective: test \~ command with non default OUTPUT_LANGUAGE which contains '-' letter +// check: indexpage.xml +// config: OUTPUT_LANGUAGE = Japanese-en +/** +\mainpage +\~english This is English. +\~dutch Dit is Nederlands. +\~japanese これは日本語です. +\~japanese-en これは日本語(en)です. +\~german Dies ist Deutsch. +\~ Output for all languages. +*/ |