summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRupinder Singh Khokhar <rsk1coder99@gmail.com>2014-07-13 08:46:10 +0530
committerRupinder Singh Khokhar <rsk1coder99@gmail.com>2014-08-01 21:44:33 +0530
commit5d07e38342f6a65cec3e661447d539b71401b49b (patch)
treeabb4df0110dd8b013a41c479cc46dd4cff076952 /include
parentcc0119cafe9c29bfb42573d65a2012dce8628c76 (diff)
downloadlibhubbub-5d07e38342f6a65cec3e661447d539b71401b49b.tar.gz
libhubbub-5d07e38342f6a65cec3e661447d539b71401b49b.tar.bz2
This is perhaps the best way to treat an incoming script content_model_flag. Black-boxing is mantained, & a switch is allowed only to a script data state. Script content model can't be incorporated in the style of rcdata & rawtext data, wherein it was easy to make a 1to1 matching between handlers and states. Also fixed the tokeniser to properly handle script tags. tokeniser was earlier modified in commit 7b6b8eb6fcbdd175540902ca699e7e704b90f9e0, has now been tested & bugs removed. Additionaly, in every loop of the dispatcher, it will be checked whether it is safe for tokeniser to process CDATA, and corresponding opts on the tokeniser will be set. this may slow the library down because of repeated checking in every loop. The tokeniser code has become unbearably messy due to the script tags, so a little tiding up & optimisation will be done later ;)
Diffstat (limited to 'include')
-rw-r--r--include/hubbub/types.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hubbub/types.h b/include/hubbub/types.h
index 6e2b1a9..a812e9f 100644
--- a/include/hubbub/types.h
+++ b/include/hubbub/types.h
@@ -34,7 +34,8 @@ typedef enum hubbub_content_model {
HUBBUB_CONTENT_MODEL_RCDATA,
HUBBUB_CONTENT_MODEL_CDATA,
HUBBUB_CONTENT_MODEL_PLAINTEXT,
- HUBBUB_CONTENT_MODEL_RAWTEXT
+ HUBBUB_CONTENT_MODEL_RAWTEXT,
+ HUBBUB_CONTENT_MODEL_SCRIPTDATA
} hubbub_content_model;
/**