Manual Snippets Syntax highlighter [Example - / FAQ]

01/01/2001  •  130 views
This will separate the plain text and code snippets in your paste. But to make this work, you have to separate it manually example code block 1:
<!DOCTYPE html>
 <meta charset="utf-8">
 body {
 a {
 a:hover {

 <p>All of your pasted content will be highlighted with the code syntax highlighter, including if there is plain text in it.</p> 
<script src=""></script>
 alert("The paragraph is now hidden");
example code block 2:
local pm = GetProjectManager();
if (IsNull(pm))
 ShowError(_T("Could not query the project manager. Cannot continue."));
 return 0;

local p = pm.GetActiveProject();

// File with the source files separated by \n
// for example:
// '''''''''''''''''''
// a.cpp
// b.cpp
// '''''''''''''''''''
local filecontent = IO.ReadFileContents (_T("D:\\ddddd\\fileList.txt"));

// Split the files in lines
local fileList = GetArrayFromString(filecontent, _T("\n"), true);
print(_T("Files to load:"));
for(local i = 0; i < fileList.GetCount(); i++)
	print(fileList.Item(i) + _T("\n")); // Print the files in the list, as a check

// Base path, the files in the text files are relative in my case. If they are absolute you can remove this
local basePath = _T("D:\\ddddd\\src\\");
for(local i = 0; i < fileList.GetCount(); i++)
 // Create file path
	local filePath = basePath + fileList.Item(i);
	// Add to all build targets
	for(local a = 0; a <= p.GetBuildTargetsCount(); a++)
 pm.AddFileToProject(filePath, p, a);
// Save the project. This triggers also an update of the project UI
 English / Indonesian