Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indicate verbatim text #115

Closed
agarwal opened this issue May 16, 2014 · 5 comments
Closed

indicate verbatim text #115

agarwal opened this issue May 16, 2014 · 5 comments

Comments

@agarwal
Copy link

agarwal commented May 16, 2014

Is there anyway to tell OMD to copy byte-for-byte some section? I'm getting to the conclusion that inserting auto-generated html into markdown is not viable.

Here's another example that is causing me problems:

# Omd.of_string "<li><span></span></li>" |> Omd.to_html;;
- : string = "<li><span></span>\n</li>\n"

The extra new line after the span is rendered as a space, depending on the style rules I use. (I blame html. The behavior might as well be random. If I underline the list item, the space isn't rendered. However, if I use a :after css selector to add a comma after the list item, then it is.)

Rather than having OMD handle every idiosyncratic detail of whatever external language one might want to insert, maybe we should just have a way to denote a raw section.

@pw374
Copy link
Contributor

pw374 commented May 16, 2014

On the library side, there's Raw of string or Raw_block of string in the type Omd.element.

On the command-line tool side, there's nothing to specify a verbatim section.

It wouldn't be too hard to add an option for omd to reduce the amount of \ns.

@pw374
Copy link
Contributor

pw374 commented May 18, 2014

(related to #107)

71cd296 gives OMD 2 new command line options:

$ printf 'P<>M' | ./omd -VS P -VE M 
<>
$ printf 'Foo!<>Bar?' | ./omd -VS 'Foo!' -VE 'Bar?'
<>

For the moment it doesn't work well with code sections.

@pw374
Copy link
Contributor

pw374 commented May 18, 2014

For the raw blocks to work in code sections, I'll have to change some types.

Code of string will probably have to become something more like Code of (string | raw) list...

@pw374
Copy link
Contributor

pw374 commented Aug 10, 2014

For Omd 1.0.0 I decided to let that Code of string be, mainly because the other idea seems actually a lot more complex than just some sort of Code of (string | raw) list.

So, I'm closing this issue. But feel free to reopen it if need be.

@pw374 pw374 closed this as completed Aug 10, 2014
@agarwal
Copy link
Author

agarwal commented Aug 10, 2014

Ok, thanks. I'll let you know if I have any concrete suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants