Hello

I started developing a plugin for a personal project. It is getting mature and 
rich in features and I'm thinking in releasing a version for everyone use. But 
for do this I have to solve a problem I don't even know how to start with. 

The plugin provides some extra features for code block. It uses highlight.js to 
provide syntax highlighting. In my use case all sentences are single line, so 
first I split the text in lines, then I highlight each line separately and then 
I  add each line inside a wrapper node. This is a problem for other situations 
like comment blocks. I thought about highlighting the whole code block and 
after that splitting it in lines. The problem is the result code block is a 
collection of DOM nodes and I'm not sure of the best way for iterating over it. 
Should I take it as a big string and parse each span or should I iterate over 
the different DOM nodes? In the second case, what is the best approach? If a 
node contains line breaks clone it as many times as line breaks it contains and 
delete the necessary text on each one? I'm totally lost. 

Thank for any help. 

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to