]> git.lyx.org Git - features.git/commitdiff
Make max_key_size limit adjustable
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 7 Jan 2017 16:46:18 +0000 (17:46 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 7 Jan 2017 16:46:18 +0000 (17:46 +0100)
This _must_ be increased for xhtml output of fullcite, else we get
fragmentary html code.

I am aware of the reason for this size limit (#8944) and have carefully
checked that this is not affected.

src/BiblioInfo.cpp

index 51d47443a9e3013a9c4a4fb1b8569ba00e41c284..025679f316ed4abc704c33459375d768027273f6 100644 (file)
@@ -512,9 +512,10 @@ docstring BibTeXInfo::expandFormat(docstring const & format,
        static int const max_passes = 5000;
        // the use of overly large keys can lead to performance problems, due
        // to eventual attempts to convert LaTeX macros to unicode. See bug
-       // #8944. This is perhaps not the best solution, but it will have to
-       // do for now.
-       static size_t const max_keysize = 128;
+       // #8944. By default, the size is limited to 128 (in CiteItem), but
+       // for specific purposes (such as XHTML export), it needs to be enlarged
+       // This is perhaps not the best solution, but it will have to do for now.
+       size_t const max_keysize = ci.max_key_size;
        odocstringstream ret; // return value
        string key;
        bool scanning_key = false;