deckstats.net
You need to be logged in to do this.
The buttons above will open in a new window. Please return to this window after you have logged in. When you have logged in, click the Refresh Session button and then try again.

Author Topic: New: Format deck descriptions with Markdown  (Read 8373 times)

Nils

  • Hero Member
  • *****
  • Posts: 1792
  • Karma: 854
  • Decks
New: Format deck descriptions with Markdown
« on: March 26, 2020, 11:09:13 pm »
Good news: You can now use Markdown syntax to format your deck descriptions!

For example, start a line with # to create a heading or surround text with two asterisks to make it **bold**. You can also make sections that can be shown/hidden on click, which should come in particularly handy for primers.

In addition, I have also made a few more changes to make working with descriptions a bit easier:
  • There is now a button to show a preview of your description before you save it.
  • You will be warned if you try to leave your deck page without saving changes to your description.
  • Descriptions and notes for previous revisions of your deck will be kept, and when you revert your deck they will also be restored.
Below are a few examples of our Markdown syntax. You can see the result of this code in this example deck.

Code: [Select]
# Markdown example
The line above will become a heading because it is prefixed with a #.

## Introduction
Two ## make a sub-heading, ### make a sub-sub-heading and so on.

Leave an empty line to make a new paragraph. **This text will be shown in bold**, *while this will be in italics*.

You can also insert a link [like this](https://deckstats.net). Card names like Black Lotus or Forest will automatically be made clickable.

## > Hidden sections
If you start a section heading with a > after the # then it will be hidden by default, and can be revealed by clicking on the heading.

To end a section, just start another one at the same or higher level:

## Lists
Here is a list of a few items:

- item1
- item2
- item3

## Advanced syntax
Use three dashes to insert a horizontal rule:

---

You can even make tables:

First Header | Second Header
------------ | -------------
Content from cell 1 | Content from cell 2
Content in the first column | Content in the second column


To read more about Markdown, have a look at this Markdown reference or Github's guide to mastering Markdown. Note that Github has a few extra features that we don't support here though, like checklists, syntax highlighting and @mentions.

Markdown is only supported in deck descriptions and private notes. In the forums and in comments we will continue to use BBCode.
« Last Edit: March 28, 2020, 12:34:36 am by Nils »

WizardSpartan

  • Hero Member
  • *****
  • Posts: 1502
  • Karma: 830
  • Red_Wyrm's boo
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #1 on: March 27, 2020, 01:17:42 am »
Nils, you spoil us.

One question, what's the character limit for deck descriptions? Is it the same as forum posts?

Edit: While starting on converting my primer to this beautiful new format, I started implementing tables. I found that the content of the tables align at the bottom of the table, which is weird. I attached a photo of what happened. Under the "Disadvantages" section of the table, the content has an extra line of space because it is only 3 lines long, while the content of the "Advantages" section of the table is 4 lines long and takes up that empty line of space. Is there something I, the user can be doing to stop that? If not, would there be any way that could be changed, so the content always starts immediately after the header?
« Last Edit: March 27, 2020, 01:33:00 am by WizardSpartan »

Nils

  • Hero Member
  • *****
  • Posts: 1792
  • Karma: 854
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #2 on: March 27, 2020, 01:52:41 pm »
The table alignment should be fixed now, please try again.

The character limit is 100,000 for now. If you actually need more than that I'd be happy to raise it further. That said, I think around that number you'll reach a point where people won't have the energy to read it all anyway... :)

WizardSpartan

  • Hero Member
  • *****
  • Posts: 1502
  • Karma: 830
  • Red_Wyrm's boo
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #3 on: March 27, 2020, 03:24:15 pm »
The character limit is 100,000 for now. If you actually need more than that I'd be happy to raise it further. That said, I think around that number you'll reach a point where people won't have the energy to read it all anyway... :)

insomniaworm

  • New Member
  • *
  • Posts: 30
  • Karma: 112
  • A once honest red mage dabbled in necromancy
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #4 on: April 01, 2020, 09:22:20 pm »
now this is very nice, like it alot  8) 8) 8)  have applied to my two IRL decks great improvement but could we go back to the deck description not being inside a scrolling iframe, infinite length was perfect, or make it optional

also, could we have a full page background image option with color/transparency level for the deck list panel

two very minor changes, that would dramatically improve the page look, now that we have markdown to insert images into the description

great work on the site thus far  :)
 

CanardWc

  • New Member
  • *
  • Posts: 1
  • Karma: 5
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #5 on: April 19, 2020, 06:16:01 pm »
Hi, really cool adding!

Do you know a good way to implement spoilers in a table? it would help a lot to make good presentations!

I know it would be a lot to ask for html implementation, hope one day it will be possible! But anyway, thanks a lot for this implementation <3

insomniaworm

  • New Member
  • *
  • Posts: 30
  • Karma: 112
  • A once honest red mage dabbled in necromancy
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #6 on: April 22, 2020, 02:40:29 am »
I know it would be a lot to ask for html implementation, hope one day it will be possible! But anyway, thanks a lot for this implementation <3
second that, dont think there is any barrier to implement html/css to be honest, is just text in the db 

question thou, not sure which of the myriad of markdowns is in play, but unable to center text, is there a way?

Nils

  • Hero Member
  • *****
  • Posts: 1792
  • Karma: 854
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #7 on: April 25, 2020, 12:42:45 am »
I have now disabled the scroll bars.

I don't think we will be able to support HTML. That would be very complex to do in a way that is both useful and not a major security concern.

At the moment we also don't support background images, spoilers or centered text, but those are all things I will think about adding in the future.

SMFrenzel

  • Jr. Member
  • **
  • Posts: 54
  • Karma: 63
  • (primary) chaos and THG builded decks
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #8 on: October 08, 2020, 01:21:08 pm »
If I use a word which also exist as card (for example: "Exclude"), how could I disable the link to the card ?

Nils

  • Hero Member
  • *****
  • Posts: 1792
  • Karma: 854
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #9 on: June 26, 2022, 06:34:07 pm »
I have just updated our cardlinker to only link Exclude when it is written with an uppercase first letter. So you can now use "exclude" in a sentence without it getting linked.

If there are other words that are often causing problems, please let me know and I can add a similar exception for them too.

joeshine

  • New Member
  • *
  • Posts: 4
  • Karma: 0
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #10 on: June 26, 2022, 07:01:15 pm »
I don't mean to go too far down the Exclude rabbit hole, but I was just looking through popular cards to get a sense of what single words people might frequently use that we wouldn't want linked. For example, it seems like to me that if someone use Abrade or Rancor or Fertilid in a sentence they're probably referring to the card. If Reanimate comes up in a conversation it might refer to the concept in general or that card specifically, but in either case linking the card would be helpful to the point being made.

Perhaps these cards too:
- Consider "if you're including XYZ cards, Consider ABC cards too..."
- Anger: probably the most likely to be used of the cycle, Brawn and Vigor and the rest of their cycles are probably ok as is
- Explore since it is also an Ixalan mechanic, it might be good to be able to refer to that without linking a different card
- Silence
- Farewell

ApothecaryGeist

  • Hero Member
  • *****
  • Posts: 1024
  • Karma: 606
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #11 on: June 26, 2022, 10:32:52 pm »
Happy Brewing!
:)

Slyvester12

  • Hero Member
  • *****
  • Posts: 844
  • Karma: 540
  • Decks
Re: New: Format deck descriptions with Markdown
« Reply #12 on: June 29, 2022, 08:21:24 pm »
Not to ruin the good work ApothecaryGeist is doing, but would it be easier to only link a card if the word is capitalized? So that Consider gets linked but consider doesn't? I think that would eliminate most of the unintentional links. (Granted, starting a sentence with a card name would still screw that up, but I'm not sure there's a great solution to that.)
Elves and infect are the best things in Magic.