mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[source] Show source files after libxml++ parsing.
This commit is contained in:
parent
9328fa261e
commit
8be72ca243
@ -100,9 +100,6 @@
|
||||
/* Define if you want: zlib support */
|
||||
#mesondefine CONFIG_GZIP
|
||||
|
||||
/* Define if you want: htmlcxx support */
|
||||
#mesondefine CONFIG_HTMLCXX
|
||||
|
||||
/* Define if you want: HTML highlighting support */
|
||||
#mesondefine CONFIG_HTML_HIGHLIGHT
|
||||
|
||||
@ -245,6 +242,9 @@
|
||||
/* Define if you want: XBEL bookmarks support */
|
||||
#mesondefine CONFIG_XBEL_BOOKMARKS
|
||||
|
||||
/* Define if you want: libxml++ support */
|
||||
#mesondefine CONFIG_XML
|
||||
|
||||
/* Define if you want: XmlTo support */
|
||||
#mesondefine CONFIG_XMLTO
|
||||
|
||||
|
@ -6,4 +6,7 @@ if conf_data.get('CONFIG_DOM')
|
||||
endif
|
||||
subdir('html')
|
||||
subdir('plain')
|
||||
if conf_data.get('CONFIG_XML')
|
||||
subdir('xml')
|
||||
endif
|
||||
srcs += files('docdata.c', 'document.c', 'format.c', 'forms.c', 'options.c', 'refresh.c', 'renderer.c')
|
||||
|
@ -19,6 +19,9 @@
|
||||
#include "document/html/frames.h"
|
||||
#include "document/html/renderer.h"
|
||||
#include "document/plain/renderer.h"
|
||||
#ifdef CONFIG_XML
|
||||
#include "document/xml/renderer.h"
|
||||
#endif
|
||||
#include "document/renderer.h"
|
||||
#include "document/view.h"
|
||||
#include "ecmascript/ecmascript.h"
|
||||
@ -247,7 +250,14 @@ render_encoded_document(struct cache_entry *cached, struct document *document)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XML
|
||||
if (document->options.plain && cached->content_type
|
||||
&& (!c_strcasecmp("text/html", cached->content_type)
|
||||
|| !c_strcasecmp("application/xhtml+xml", cached->content_type))) {
|
||||
render_source_document_cxx(cached, document, &buffer);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (document->options.plain) {
|
||||
#ifdef CONFIG_DOM
|
||||
if (cached->content_type
|
||||
|
@ -60,7 +60,6 @@ static xmlpp::Document emptyDoc;
|
||||
static JSObject *getDoctype(JSContext *ctx, void *node);
|
||||
|
||||
static bool document_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp);
|
||||
static void *document_parse(struct document *document);
|
||||
|
||||
JSClassOps document_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
@ -1263,7 +1262,7 @@ document_replace(JSContext *ctx, unsigned int argc, JS::Value *vp)
|
||||
return(true);
|
||||
}
|
||||
|
||||
static void *
|
||||
void *
|
||||
document_parse(struct document *document)
|
||||
{
|
||||
struct cache_entry *cached = document->cached;
|
||||
|
@ -7,5 +7,6 @@
|
||||
extern JSClass document_class;
|
||||
extern const spidermonkeyFunctionSpec document_funcs[];
|
||||
extern JSPropertySpec document_props[];
|
||||
void *document_parse(struct document *document);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user