darioteixeira / lambdoc

Lambdoc is a library providing support for semantically complex documents in Ocsigen web applications
GNU General Public License v2.0
17 stars 1 forks source link

Lambcmd : Autodetect markup based on file extension #9

Closed Drup closed 9 years ago

Drup commented 9 years ago

The title says it all. :)

darioteixeira commented 9 years ago

Yeah, that would be easy, and I'll add that funcionality to the next beta. I stil haven't quite settled on "official" file extensions for my markup languages, but that's a minor issue.

What I did have in mind is automatic markup detection based on statistical patterns in the source. It's relatively easy to implement, and it could be useful for a website that accepted multiple markups (so users don't have to explictly choose the markup, or the website can warn them if the markup they have chosen doesn't seem to match the markup they actually used)

Drup commented 9 years ago

That's an interesting feature, but it seems quite more complicated than what I had in mind ! Well, if you are ready to implement that, I certainly wouldn't mind. :p

darioteixeira commented 9 years ago

Don't worry, the implementation is actually a lot simpler than what it sounds at first... :-) (I've done similar stuff before)

darioteixeira commented 9 years ago

Wow, it seems Github very cleverly closed this issue automatically upon my last commit. Anyway, the feature is implemented in its simplest form: auto-detection is attempted based on file extension. I would still like to eventually provide auto-detection based on heuristical analysis, but that's more useful for websites anyway and not urgent.

Drup commented 9 years ago

Nice, thanks.