View Single Post
Old 07-04-2012, 03:19 AM
seanferns seanferns is online now
Registered User
Join Date: 01-30-2012
Posts: 56
Syntax Highlighting

I was trying to get syntax highlighting working for SQL files and came across this thread:

I need to be able to create sql docs with syntax highlighting just like creating text so I followed what the 4th post says:
Another option is to import a source code file as a template in UR and use UR's text file syntax highlighting.
Here is the problem: I created a template based on a dummy.sql file and while importing, selected to move the file. I then create an item based on this template and get syntax highlighting. Now if I have two or more such items and do a sync even by mistake I would lose all but the last sql. The thing is that although the data is stored in UR it still has a URL and that is the same across the items created ( if this was an expression pointing to ItemID it might resolve this). Also, to get the highlighting effect, the extension is picked from the URL. If the content-type was editable or if there was some other field to denote it that might be a better solution.
One minor point is that when changing the title of a stored item, the "[Stored]" next to the name disappears. Going to another item and then back works.
Reply With Quote