Giter Site home page Giter Site logo

Comments (21)

puzrin avatar puzrin commented on May 12, 2024

Lets keep duscussion close to topic. The question is to provide examples, when html needed .

from remarkable.

howardroark avatar howardroark commented on May 12, 2024

My bad! I deleted it... I think I read the PS and my thoughts trailed off.

My gut is that if you need to use HTML you may be trying to use Markdown as a development tool rather than a writing tool. If you are trying to use Markdown to make development of Marketing sites easier for teams maybe instead look at something like BEM. IMO Markdown is for expressing yourself, not building a UI. If you can't agree on that, there is no real way to have a philosophy for a spec.

from remarkable.

jonschlinkert avatar jonschlinkert commented on May 12, 2024

are those really needed or added just because someone expected that "it could be useful sometime"

using HTML/markdown together is fairly common in documentation, for example: https://github.com/zurb/foundation/blob/master/doc/pages/changelog.html (foundation uses assemble to build their docs).

Generally, the goal is to use markdown as much as possible for written content, and use HTML when necessary to achieve formatting or structural results that are not possible or practical with markdown. Also I think GitHub and marked.js have created the expectation that HTML and markdown should be able to live together.

On a personal note, once remarkable is ready for production I'd like to be able to do pull requests on other projects to swap out remarkable for marked.js. Having feature parity with marked.js will make this easy to do.

from remarkable.

puzrin avatar puzrin commented on May 12, 2024

As far as i see, those examples needs "unlimited html" with post-filtering. I expected, that someone has case like me - "uncontrolled" user content, like forum posts. In this case html should be disabled, or strictly limited to couple of tags, or enchanced only with macros (for example, to add mathjax).

If nobody has examples for restricted html, i'll abandon this from roadmap to save time.

from remarkable.

howardroark avatar howardroark commented on May 12, 2024

+1 for abandon. On/Off HTML is super easy to understand.

from remarkable.

tunnckoCore avatar tunnckoCore commented on May 12, 2024

+1 abandon, why not.

protect result from security vulnerabilities

is very good point.

from remarkable.

howardroark avatar howardroark commented on May 12, 2024

My vote is for having a safe-mode setting that needs to be expressly turned
off to use HTML. If turned off it allows unlimited HTML to pass through
unvalidated. When on by default it kills any HTML. This allows tools which
assemble HTML for CDN hosting to pass through HTML safely. Anything that
allows users to edit Markdown should NOT be able to pass through HTML. No
need to burden the net with XSS.

from remarkable.

tunnckoCore avatar tunnckoCore commented on May 12, 2024

Mm.. As I said here commonmark/commonmark-spec#61 (comment)
I think the scope of markdown library must only be to output a valid HTML. But not in the core of markdown libraries. Maybe as option and heavy notice in their READMEs that they can plug some sanitizer/validator right before final output.

from remarkable.

jonschlinkert avatar jonschlinkert commented on May 12, 2024

gents, let's keep this focused on the topic of the issue please: features. You're words will be more effective in the right channels, e.g. take the debate to a repo that is trying to push a spec.

IMO Markdown is for expressing yourself, not building a UI. If you can't agree on that, there is no real way to have a philosophy for a spec.

we're not building a spec, stmd is trying to do that, and so is https://github.com/vfmd/vfmd-spec/blob/gh-pages/specification.md. we're building remarkable to adhere to a spec being championed elsewhere.

My vote is for having a safe-mode setting that needs to be expressly turned off to use HTML

Again, there is already a spec for this, and it wasn't decided on this project: See: https://github.com/jgm/stmd/blob/6326bc748c8f5f225d82c01fe6763776f2bbd88e/spec.txt#L1348

from remarkable.

howardroark avatar howardroark commented on May 12, 2024

Deal. I think I'm just confused in all this Markdown business. If only John Gruber would just take the lead and offer a place for real discussion about the philosophy.

Sorry, I'll lay off.

from remarkable.

jonschlinkert avatar jonschlinkert commented on May 12, 2024

lol np

from remarkable.

tunnckoCore avatar tunnckoCore commented on May 12, 2024

Haha, yea. I think the time for Markdown Conference come, not only discussing on forums and mailing lists. Just idea ;p

from remarkable.

puzrin avatar puzrin commented on May 12, 2024

Closed - implemented with on/off option, that's enougth now.

from remarkable.

rlidwka avatar rlidwka commented on May 12, 2024

we're building remarkable to adhere to a spec being championed elsewhere.

With all due respect, this isn't exactly true. E.g., there are no tables in the either spec.

Remarkable is going to have stmd-compatible mode, but it just might have other things like html escaping which isn't covered by any markdown standard I know of.

Thus, discussion how to handle html stuff is valid here. "on/off" switch seems a good solution though.

from remarkable.

jonschlinkert avatar jonschlinkert commented on May 12, 2024

With all due respect, this isn't exactly true. E.g., there are no tables in the either spec.

I didn't say we can't discuss concepts that go beyond the spec. But, unless you guys have decided otherwise, it's my understanding that we are not championing a spec in this project.

from remarkable.

puzrin avatar puzrin commented on May 12, 2024

Yeah, no specs here, or this story will never finish. All features without good examples of real use will be declined in core. But nobody prohibits to write extentions. I hope, upcoming design will finally allow do it without ass pain.

from remarkable.

skhavari avatar skhavari commented on May 12, 2024

Markdown in markdown (the inception use case?) is a good example of where html in markdown is useful. For example, the following is markdown in preformatted html

# Sample Markdown
* one
* two
* three

```javascript
var x = "The quick brown fox...";
console.log( x );
````

from remarkable.

puzrin avatar puzrin commented on May 12, 2024

Seems that can be done via fenced block without any changes. Or may be i didn't understood what you need,

from remarkable.

skhavari avatar skhavari commented on May 12, 2024

To write markdown in a fenced block would require nested fenced blocks, which today the parser doesn't seem to support.

An alternative is to embed markdown in preformatted html which is very easy to author

_insert_any_markdown_here_

from remarkable.

puzrin avatar puzrin commented on May 12, 2024

Nested fences are possible. Just use different (but > 3) backticks for parents and childs. Or use ~~~ instead of backticks. See example in commonmark spec http://spec.commonmark.org/0.7/#fenced-code-blocks

from remarkable.

skhavari avatar skhavari commented on May 12, 2024

sweet!

from remarkable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.